Skip to content

Instantly share code, notes, and snippets.

@cfoellmann
Forked from ethitter/gist:4430520
Created October 9, 2016 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cfoellmann/d6f11180d159b545947e4aeed7194f19 to your computer and use it in GitHub Desktop.
Save cfoellmann/d6f11180d159b545947e4aeed7194f19 to your computer and use it in GitHub Desktop.
WordPress MU Domain Mapping and the Customizer
Index: domain_mapping.php
===================================================================
--- domain_mapping.php (revision 688919)
+++ domain_mapping.php (working copy)
@@ -685,7 +685,7 @@
}
function redirect_to_mapped_domain() {
- global $current_blog, $wpdb;
+ global $current_blog, $wpdb, $wp_customize;
// don't redirect the main site
if ( is_main_site() )
@@ -695,7 +695,7 @@
return;
// don't redirect theme customizer (WP 3.4)
- if ( isset( $_POST['customize'] ) && isset( $_POST['theme'] ) && $_POST['customize'] == 'on' )
+ if ( is_a( $wp_customize, 'WP_Customize_Manager' ) )
return;
$protocol = is_ssl() ? 'https://' : 'http://';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment