We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9f5b50 commit 6b33d87Copy full SHA for 6b33d87
mu-plugins/jquery-filters.php
@@ -120,3 +120,13 @@ function strip_https($url) {
120
121
return preg_replace( '/^https?:/', '', $url );
122
}
123
+
124
+// Production databases set the home values in corresponding site options tables.
125
+// However, sites that use jquery-static-index.php cause index pages
126
+// to redirect to live sites in local development. This filter does not
127
+// prevent the redirect, but changes the redirect to the local site.
128
+if (JQUERY_STAGING && JQUERY_STAGING_PREFIX && JQUERY_LIVE_SITE) {
129
+ add_filter( 'option_home', function( $value ) {
130
+ return str_replace( '//' . JQUERY_LIVE_SITE, '//' . JQUERY_STAGING_PREFIX . JQUERY_LIVE_SITE, $value );
131
+ } );
132
+}
0 commit comments