Advertisement
mbis

Multisite - reload globals

Nov 28th, 2019
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. function pm_reload_globals($new_blog_id) {
  2.   global $permalink_manager_uris, $permalink_manager_redirects, $permalink_manager_external_redirects;
  3.  
  4.     if(function_exists('get_blog_option')) {
  5.       $permalink_manager_uris = get_blog_option($new_blog_id, 'permalink-manager-uris');
  6.       $permalink_manager_redirects = get_blog_option($new_blog_id, 'permalink-manager-redirects');
  7.       $permalink_manager_external_redirects = get_blog_option($new_blog_id, 'permalink-manager-external-redirects');
  8.     }
  9. }
  10. add_action('switch_blog', 'pm_reload_globals', 9);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement