Changeset 13678 for trunk/src/bp-core/admin/bp-core-admin-rewrites.php
- Timestamp:
- 12/24/2023 04:21:16 AM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-rewrites.php
r13674 r13678 39 39 } 40 40 41 $switched_to_root_blog = false; 42 43 // Make sure the current blog is set to the root blog. 44 if ( ! bp_is_root_blog() ) { 45 switch_to_blog( bp_get_root_blog_id() ); 46 $switched_to_root_blog = true; 47 } 48 41 49 $directory_pages = (array) bp_core_get_directory_pages(); 42 50 $current_page_slugs = wp_list_pluck( $directory_pages, 'slug', 'id' ); … … 96 104 if ( $reset_rewrites ) { 97 105 bp_delete_rewrite_rules(); 106 } 107 108 if ( $switched_to_root_blog ) { 109 restore_current_blog(); 98 110 } 99 111
Note: See TracChangeset
for help on using the changeset viewer.