Changeset 4041
- Timestamp:
- 09/12/2016 09:37:51 PM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-directory-compat.php
r4026 r4041 21 21 var $contributors = null; 22 22 var $query = null; 23 var $term = null; 23 24 24 25 public function init() { … … 130 131 $this->register_views(); 131 132 133 // Set the term for this view so we can reuse it. 134 $this->term = get_term_by( 'slug', $this->slug(), $this->taxonomy() ); 135 132 136 // Add theme-specific filters and actions. 133 137 add_action( 'wporg_compat_view_sidebar', array( $this, 'do_view_sidebar' ) ); … … 147 151 if ( class_exists( 'WPORG_Ratings' ) && class_exists( 'WordPressdotorg\Forums\Ratings_Compat' ) ) { 148 152 $this->ratings = new Ratings_Compat( $this->compat(), $this->slug(), $this->taxonomy(), $this->get_object( $this->slug() ) ); 153 } 154 155 // Instantiate WPORG_Stickies mode for support view. 156 if ( class_exists( 'WordPressdotorg\Forums\Stickies_Compat' ) ) { 157 $this->stickies = new Stickies_Compat( $this->compat(), $this->slug(), $this->taxonomy(), $this->get_object( $this->slug() ), $this->term ); 149 158 } 150 159 … … 164 173 $this->authors = $this->get_authors( $slug ); 165 174 $this->contributors = $this->get_contributors( $slug ); 175 $this->term = $terms[0]; 166 176 167 177 // Add output filters and actions. … … 278 288 'terms' => $this->slug(), 279 289 ) ), 280 'show_stickies' => false,290 'show_stickies' => true, 281 291 'meta_key' => null, 282 292 'meta_compare' => null, … … 466 476 467 477 $term_subscription = ''; 468 $term = get_term_by( 'slug', $this->slug(), $this->taxonomy() );478 $term = $this->term; 469 479 if ( ! $term ) { 470 480 // New compats won't have any support topics or reviews, so will … … 474 484 } 475 485 if ( $term ) { 486 $this->term = $term; 476 487 $subscribe = $unsubscribe = ''; 477 488 if ( 'plugin' == $this->compat() ) { -
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/support-forums.php
r3987 r4041 27 27 include( dirname( __FILE__ ) . '/inc/class-plugin-directory-compat.php' ); 28 28 include( dirname( __FILE__ ) . '/inc/class-ratings-compat.php' ); 29 include( dirname( __FILE__ ) . '/inc/class-stickies-compat.php' ); 29 30 include( dirname( __FILE__ ) . '/inc/class-performance-optimizations.php' ); 30 31
Note: See TracChangeset
for help on using the changeset viewer.