Making WordPress.org

Changeset 13193


Ignore:
Timestamp:
02/09/2024 02:34:25 AM (5 months ago)
Author:
dd32
Message:

Plugin Directory: Fix taxonomy queries on author archives.

Previously the query was being adjusted to an OR query for all taxonomies, when it was only intended to be an OR between committers & contributors.

Fixes #7456.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php

    r13192 r13193  
    855855
    856856            // Author archives by default list plugins you're a contributor on.
    857             $wp_query->query_vars['tax_query'] = array(
    858                 'relation' => 'OR',
     857            $wp_query->query_vars['tax_query']['author'] = array(
    859858                array(
    860859                    'taxonomy' => 'plugin_contributors',
     
    862861                    'terms'    => $user,
    863862                ),
     863                'relation' => 'OR',
    864864            );
    865865
     
    867867            // Plugin Reviewers also see plugins you're a committer on here.
    868868            if ( $viewing_own_author_archive ) {
    869                 $wp_query->query_vars['tax_query'][] = array(
     869                $wp_query->query_vars['tax_query']['author'][] = array(
    870870                    'taxonomy' => 'plugin_committers',
    871871                    'field'    => 'slug',
Note: See TracChangeset for help on using the changeset viewer.