Changeset 5369 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-badges/inc/class-plugin.php
- Timestamp:
- 04/19/2017 06:31:54 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-badges/inc/class-plugin.php
r5304 r5369 348 348 */ 349 349 public function is_user_author( $user_nicename, $type, $slug ) { 350 if ( 'plugin' === $type ) { 351 $compat = class_exists( '\WordPressdotorg\Forums\Plugin' ) ? \WordPressdotorg\Forums\Plugin::get_instance()->plugins : ''; 350 if ( class_exists( '\WordPressdotorg\Forums\Plugin' ) ) { 351 if ( 'plugin' === $type ) { 352 $compat = \WordPressdotorg\Forums\Plugin::get_instance()->plugins; 353 } else { 354 $compat = \WordPressdotorg\Forums\Plugin::get_instance()->themes; 355 } 352 356 } else { 353 $compat = class_exists( '\WordPressdotorg\Forums\Theme' ) ? \WordPressdotorg\Forums\Theme::get_instance()->themes : ''; 354 } 357 $compat = null; 358 } 359 355 360 $authors = $compat ? $compat->get_authors( $slug ) : array(); 356 361 … … 370 375 */ 371 376 public function is_user_contributor( $user_nicename, $type, $slug ) { 372 if ( 'plugin' === $type ) { 373 $compat = class_exists( '\WordPressdotorg\Forums\Plugin' ) ? \WordPressdotorg\Forums\Plugin::get_instance()->plugins : ''; 377 if ( class_exists( '\WordPressdotorg\Forums\Plugin' ) ) { 378 if ( 'plugin' === $type ) { 379 $compat = \WordPressdotorg\Forums\Plugin::get_instance()->plugins; 380 } else { 381 $compat = \WordPressdotorg\Forums\Plugin::get_instance()->themes; 382 } 374 383 } else { 375 $compat = class_exists( '\WordPressdotorg\Forums\Theme' ) ? \WordPressdotorg\Forums\Theme::get_instance()->themes : ''; 376 } 384 $compat = null; 385 } 386 377 387 $contributors = $compat ? $compat->get_contributors( $slug ) : array(); 378 388
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)