diff --git src/bp-core/classes/class-bp-admin.php src/bp-core/classes/class-bp-admin.php
index b825da41c..cc64f593f 100644
|
|
|
class BP_Admin { |
| 388 | 388 | */ |
| 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 | } |
| 396 | 401 | } |
| … |
… |
class BP_Admin { |
| 581 | 586 | ) ); |
| 582 | 587 | } |
| 583 | 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' ); |
| | 603 | } |
| | 604 | |
| 584 | 605 | /** |
| 585 | 606 | * Add some general styling to the admin area. |
| 586 | 607 | * |