Changeset 6897 for trunk/src/includes/admin/classes/class-bbp-admin.php
- Timestamp:
- 01/29/2019 04:38:37 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/classes/class-bbp-admin.php
r6896 r6897 169 169 add_action( 'bbp_admin_init', array( $this, 'hide_notices' ) ); 170 170 add_action( 'bbp_admin_notices', array( $this, 'output_notices' ) ); 171 172 /** Upgrades **********************************************************/ 173 174 add_action( 'bbp_admin_init', array( $this, 'add_upgrade_count' ) ); 171 175 172 176 /** Ajax **************************************************************/ … … 387 391 388 392 /** 393 * Maybe append the pending upgrade count to the "Tools" menu. 394 * 395 * @since 2.6.0 bbPress (r6896) 396 * 397 * @global menu $menu 398 */ 399 public function add_upgrade_count() { 400 global $menu; 401 402 foreach ( $menu as $menu_index => $menu_item ) { 403 $found = array_search( 'tools.php', $menu_item, true ); 404 405 if ( false !== $found ) { 406 $menu[ $menu_index ][ 0 ] = bbp_maybe_append_pending_upgrade_count( $menu[ $menu_index ][ 0 ] ); 407 continue; 408 } 409 } 410 } 411 412 /** 389 413 * Add the admin menus 390 414 * … … 424 448 add_management_page( 425 449 esc_html__( 'Forums', 'bbpress' ), 426 esc_html__( 'Forums', 'bbpress'),450 bbp_maybe_append_pending_upgrade_count( esc_html__( 'Forums', 'bbpress' ) ), 427 451 'bbp_tools_page', 428 452 'bbp-repair',
Note: See TracChangeset
for help on using the changeset viewer.