Changeset 10486 for trunk/src/bp-core/admin/bp-core-admin-tools.php
- Timestamp:
- 01/31/2016 05:30:30 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-tools.php
r10476 r10486 428 428 */ 429 429 function bp_admin_reinstall_emails() { 430 $switched = false; 431 432 // Switch to the root blog, where the email posts live. 433 if ( ! bp_is_root_blog() ) { 434 switch_to_blog( bp_get_root_blog_id() ); 435 $switched = true; 436 } 437 430 438 $emails = get_posts( array( 431 439 'fields' => 'ids', … … 445 453 bp_core_install_emails(); 446 454 455 if ( $switched ) { 456 restore_current_blog(); 457 } 458 447 459 return array( 0, __( 'Emails have been successfully reinstalled.', 'buddypress' ) ); 448 460 }
Note: See TracChangeset
for help on using the changeset viewer.