X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/38ac4bc40322ecdc4052db4263466573e01fa51f..6359b807ff8b4ffa151d8756cdefb861c6c1d4db:/wp-includes/theme.php diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 1b372da3..6abf1dc1 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -673,8 +673,6 @@ function preview_theme() { // Prevent theme mods to current theme being used on theme being previewed add_filter( 'pre_option_theme_mods_' . get_option( 'stylesheet' ), '__return_empty_array' ); - - ob_start( 'preview_theme_ob_filter' ); } /** @@ -711,7 +709,7 @@ function _preview_theme_stylesheet_filter() { * @return string */ function preview_theme_ob_filter( $content ) { - return preg_replace_callback( "|()|", 'preview_theme_ob_filter_callback', $content ); + return $content; } /** @@ -726,26 +724,7 @@ function preview_theme_ob_filter( $content ) { * @return string */ function preview_theme_ob_filter_callback( $matches ) { - if ( strpos($matches[4], 'onclick') !== false ) - $matches[4] = preg_replace('#onclick=([\'"]).*?(?. (? 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1 ), $matches[3] ); - if ( 0 === strpos($link, 'preview=1') ) - $link = "?$link"; - return $matches[1] . esc_attr( $link ) . $matches[4]; + return $matches[0]; } /**