Changeset 13139
- Timestamp:
- 11/07/2021 12:46:35 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-admin.php
r13138 r13139 389 389 do_action_ref_array( 'bp_admin_submenu_pages', array( &$this->submenu_pages ) ); 390 390 391 foreach( $this->submenu_pages as $subpage_ hooks ) {391 foreach( $this->submenu_pages as $subpage_type => $subpage_hooks ) { 392 392 foreach ( $subpage_hooks as $subpage_hook ) { 393 393 add_action( "admin_print_styles-{$subpage_hook}", array( $this, 'add_inline_styles' ), 20 ); 394 395 // When BuddyPress is activated on the network, the settings screens need an admin notice when settings have been updated. 396 if ( is_network_admin() && bp_is_network_activated() && 'settings' === $subpage_type && 'settings_page_bp-credits' !== $subpage_hook ) { 397 add_action( "load-{$subpage_hook}", array( $this, 'admin_load' ) ); 398 } 394 399 } 395 400 } … … 580 585 'about' => '<a href="' . esc_url( bp_get_admin_url( '?hello=buddypress' ) ) . '">' . esc_html_x( 'Hello, BuddyPress!', 'Colloquial alternative to "learn about BuddyPress"', 'buddypress' ) . '</a>' 581 586 ) ); 587 } 588 589 /** 590 * Displays an admin notice to inform settings have been saved. 591 * 592 * The notice is only displayed inside the Network Admin when 593 * BuddyPress is network activated. 594 * 595 * @since 10.0.0 596 */ 597 public function admin_load() { 598 if ( ! isset( $_GET['updated'] ) ) { 599 return; 600 } 601 602 bp_core_add_admin_notice( __( 'Settings saved.', 'buddypress' ), 'updated' ); 582 603 } 583 604
Note: See TracChangeset
for help on using the changeset viewer.