Making WordPress.org


Ignore:
Timestamp:
05/13/2020 03:31:34 AM (4 years ago)
Author:
dd32
Message:

Support Forums: Reviews: Include the rating in plugin/theme review feeds.

See #1611.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-theme-directory-compat.php

    r9041 r9857  
    7474     */
    7575    public function parse_query() {
     76        global $wp;
     77
    7678        $slug = get_query_var( 'wporg_theme' );
    7779        if ( ! $slug ) {
    78             return;
     80            // bbPress feeds are bad and don't actually fill in globals.
     81            if ( isset( $wp->query_vars['feed'] ) && ! empty( $wp->query_vars['wporg_theme'] ) ) {
     82                $slug = $wp->query_vars['wporg_theme'];
     83            } else {
     84                return;
     85            }
    7986        }
    8087
     
    8895            status_header( 404 );
    8996            return;
    90         } else {
    91             $this->slug         = $slug;
    92             $this->theme        = $theme;
    93             $this->authors      = $this->get_authors( $slug );
    94             $this->contributors = $this->get_contributors( $slug );
    95             $this->support_reps = $this->get_support_reps( $slug );
    9697        }
     98
     99        $this->slug         = $slug;
     100        $this->theme        = $theme;
     101        $this->authors      = $this->get_authors( $slug );
     102        $this->contributors = $this->get_contributors( $slug );
     103        $this->support_reps = $this->get_support_reps( $slug );
    97104    }
    98105
Note: See TracChangeset for help on using the changeset viewer.