Changeset 5960
- Timestamp:
- 09/23/2017 03:55:48 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc
- Files:
-
- 3 edited
-
class-directory-compat.php (modified) (2 diffs)
-
class-ratings-compat.php (modified) (1 diff)
-
class-stickies-compat.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-directory-compat.php
r5868 r5960 295 295 // Instantiate WPORG_Ratings compat mode for reviews. 296 296 if ( class_exists( 'WPORG_Ratings' ) && class_exists( 'WordPressdotorg\Forums\Ratings_Compat' ) ) { 297 $this->ratings = new Ratings_Compat( $this->compat(), $this->slug(), $this->taxonomy(), $this->get_object( $this->slug() ) ); 297 $this->ratings = new Ratings_Compat( array( 298 'compat' => $this->compat(), 299 'slug' => $this->slug(), 300 'taxonomy' => $this->taxonomy(), 301 'object' => $this->get_object( $this->slug() ), 302 ) ); 298 303 } 299 304 300 305 // Instantiate WPORG_Stickies mode for support view. 301 306 if ( class_exists( 'WordPressdotorg\Forums\Stickies_Compat' ) ) { 302 $this->stickies = new Stickies_Compat( $this->compat(), $this->slug(), $this->taxonomy(), $this->get_object( $this->slug() ), $this->term ); 307 $this->stickies = new Stickies_Compat( array( 308 'compat' => $this->compat(), 309 'slug' => $this->slug(), 310 'taxonomy' => $this->taxonomy(), 311 'object' => $this->get_object( $this->slug() ), 312 'term' => $this->term, 313 ) ); 303 314 } 304 315 … … 329 340 // Instantiate WPORG_Ratings compat mode for reviews. 330 341 if ( class_exists( 'WPORG_Ratings' ) && class_exists( 'WordPressdotorg\Forums\Ratings_Compat' ) ) { 331 $this->ratings = new Ratings_Compat( $this->compat(), $this->slug(), $this->taxonomy(), $this->get_object( $this->slug() ) ); 342 $this->ratings = new Ratings_Compat( array( 343 'compat' => $this->compat(), 344 'slug' => $this->slug(), 345 'taxonomy' => $this->taxonomy(), 346 'object' => $this->get_object( $this->slug() ), 347 ) ); 332 348 } 333 349 334 350 // Instantiate WPORG_Stickies mode for topic view. 335 351 if ( class_exists( 'WordPressdotorg\Forums\Stickies_Compat' ) ) { 336 $this->stickies = new Stickies_Compat( $this->compat(), $this->slug(), $this->taxonomy(), $this->get_object( $this->slug() ), $this->term, $this->authors, $this->contributors, $this->support_reps ); 352 $this->stickies = new Stickies_Compat( array( 353 'compat' => $this->compat(), 354 'slug' => $this->slug(), 355 'taxonomy' => $this->taxonomy(), 356 'object' => $this->get_object( $this->slug() ), 357 'term' => $this->term, 358 'authors' => $this->authors, 359 'contributors' => $this->contributors, 360 'support_reps' => $this->support_reps, 361 ) ); 337 362 } 338 363 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-ratings-compat.php
r5061 r5960 12 12 var $filter = false; 13 13 14 public function __construct( $ compat, $slug, $taxonomy, $object) {14 public function __construct( $args ) { 15 15 if ( ! class_exists( 'WPORG_Ratings' ) ) { 16 16 return; 17 17 } 18 18 19 if ( empty( $compat ) || empty( $slug ) || empty( $taxonomy ) || empty( $object ) ) { 20 return; 21 } 22 23 $this->compat = $compat; 24 $this->slug = $slug; 25 $this->taxonomy = $taxonomy; 26 $this->object = $object; 19 $args = wp_parse_args( $args, array( 20 'compat' => '', 21 'slug' => '', 22 'taxonomy' => '', 23 'object' => '', 24 ) ); 25 26 if ( ! $args['compat'] || ! $args['slug'] || ! $args['taxonomy'] || ! $args['object'] ) { 27 return; 28 } 29 30 $this->compat = $args['compat']; 31 $this->slug = $args['slug']; 32 $this->taxonomy = $args['taxonomy']; 33 $this->object = $args['object']; 27 34 28 35 $this->ratings_counts = \WPORG_Ratings::get_rating_counts( $this->compat, $this->slug ); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-stickies-compat.php
r5868 r5960 13 13 var $term = null; 14 14 15 public function __construct( $compat, $slug, $taxonomy, $object, $term, $authors = array(), $contributors = array(), $support_reps = array() ) { 16 if ( empty( $compat ) || empty( $slug ) || empty( $taxonomy ) || empty( $object ) || empty( $term ) ) { 15 public function __construct( $args ) { 16 $args = wp_parse_args( $args, array( 17 'compat' => '', 18 'slug' => '', 19 'taxonomy' => '', 20 'object' => '', 21 'term' => '', 22 'authors' => array(), 23 'contributors' => array(), 24 'support_reps' => array(), 25 ) ); 26 27 if ( ! $args['compat'] || ! $args['slug'] || ! $args['taxonomy'] || ! $args['object'] || ! $args['term'] ) { 17 28 return; 18 29 } 19 30 20 $this->compat = $ compat;21 $this->slug = $ slug;22 $this->taxonomy = $ taxonomy;23 $this->object = $ object;24 $this->term = $ term;25 $this->authors = $a uthors;26 $this->contributors = $ contributors;27 $this->support_reps = $ support_reps;31 $this->compat = $args['compat']; 32 $this->slug = $args['slug']; 33 $this->taxonomy = $args['taxonomy']; 34 $this->object = $args['object']; 35 $this->term = $args['term']; 36 $this->authors = $args['authors']; 37 $this->contributors = $args['contributors']; 38 $this->support_reps = $args['support_reps']; 28 39 29 40 // Remove global stickies from sticky array.
Note: See TracChangeset
for help on using the changeset viewer.