Changeset 10486
- Timestamp:
- 01/31/2016 05:30:30 PM (9 years ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 2 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 } -
trunk/src/bp-core/bp-core-customizer-email.php
r10475 r10486 393 393 */ 394 394 function bp_email_redirect_to_customizer() { 395 $switched = false; 396 397 // Switch to the root blog, where the email posts live. 398 if ( ! bp_is_root_blog() ) { 399 switch_to_blog( bp_get_root_blog_id() ); 400 $switched = true; 401 } 402 395 403 $email = get_posts( array( 396 404 'fields' => 'ids', … … 418 426 ); 419 427 428 if ( $switched ) { 429 restore_current_blog(); 430 } 431 420 432 printf( 421 433 '<script type="text/javascript">window.location = "%s";</script>',
Note: See TracChangeset
for help on using the changeset viewer.