Changeset 5960 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-ratings-compat.php
- Timestamp:
- 09/23/2017 03:55:48 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 );
Note: See TracChangeset
for help on using the changeset viewer.