<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[33492] trunk/src: Themes: Remove legacy theme preview.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/33492">33492</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/33492","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>ocean90</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-07-29 18:35:40 +0000 (Wed, 29 Jul 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Themes: Remove legacy theme preview.
The pre-3.4 theme previewer doesn't work when using a static front page.
We kept the old theme preview for no-JS and some browsers that were less capable. But since browsers are doing a better job today we don't need to continue fixing/shipping this legacy code. Bye!
fixes <a href="https://core.trac.wordpress.org/ticket/33178">#33178</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincustomizephp">trunk/src/wp-admin/customize.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpthemeslisttablephp">trunk/src/wp-admin/includes/class-wp-themes-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpupgraderskinsphp">trunk/src/wp-admin/includes/class-wp-upgrader-skins.php</a></li>
<li><a href="#trunksrcwpadminincludesthemephp">trunk/src/wp-admin/includes/theme.php</a></li>
<li><a href="#trunksrcwpadminjscustomizecontrolsjs">trunk/src/wp-admin/js/customize-controls.js</a></li>
<li><a href="#trunksrcwpadminthemesphp">trunk/src/wp-admin/themes.php</a></li>
<li><a href="#trunksrcwpincludesdefaultfiltersphp">trunk/src/wp-includes/default-filters.php</a></li>
<li><a href="#trunksrcwpincludesdeprecatedphp">trunk/src/wp-includes/deprecated.php</a></li>
<li><a href="#trunksrcwpincludesthemephp">trunk/src/wp-includes/theme.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincustomizephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/customize.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/customize.php 2015-07-29 18:12:26 UTC (rev 33491)
+++ trunk/src/wp-admin/customize.php 2015-07-29 18:35:40 UTC (rev 33492)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -213,14 +213,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $allowed_urls = array_unique( apply_filters( 'customize_allowed_urls', $allowed_urls ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $fallback_url = add_query_arg( array(
- 'preview' => 1,
- 'template' => $wp_customize->get_template(),
- 'stylesheet' => $wp_customize->get_stylesheet(),
- 'preview_iframe' => true,
- 'TB_iframe' => 'true'
- ), home_url( '/' ) );
-
</del><span class="cx" style="display: block; padding: 0 10px"> $login_url = add_query_arg( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'interim-login' => 1,
</span><span class="cx" style="display: block; padding: 0 10px"> 'customize-login' => 1
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -239,7 +231,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'ajax' => esc_url_raw( admin_url( 'admin-ajax.php', 'relative' ) ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'allowed' => array_map( 'esc_url_raw', $allowed_urls ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'isCrossDomain' => $cross_domain,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'fallback' => esc_url_raw( $fallback_url ),
</del><span class="cx" style="display: block; padding: 0 10px"> 'home' => esc_url_raw( home_url( '/' ) ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'login' => esc_url_raw( $login_url ),
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpthemeslisttablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-themes-list-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-themes-list-table.php 2015-07-29 18:12:26 UTC (rev 33491)
+++ trunk/src/wp-admin/includes/class-wp-themes-list-table.php 2015-07-29 18:35:40 UTC (rev 33492)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -174,17 +174,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $activate_link = wp_nonce_url( "themes.php?action=activate&template=" . urlencode( $template ) . "&stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $stylesheet );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $preview_link = esc_url( add_query_arg(
- array( 'preview' => 1, 'template' => urlencode( $template ), 'stylesheet' => urlencode( $stylesheet ), 'preview_iframe' => true, 'TB_iframe' => 'true' ),
- home_url( '/' ) ) );
-
</del><span class="cx" style="display: block; padding: 0 10px"> $actions = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $actions['activate'] = '<a href="' . $activate_link . '" class="activatelink" title="'
</span><span class="cx" style="display: block; padding: 0 10px"> . esc_attr( sprintf( __( 'Activate “%s”' ), $title ) ) . '">' . __( 'Activate' ) . '</a>';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $actions['preview'] = '<a href="' . $preview_link . '" class="hide-if-customize" title="'
- . esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '">' . __( 'Preview' ) . '</a>';
-
</del><span class="cx" style="display: block; padding: 0 10px"> if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="load-customize hide-if-no-customize">'
</span><span class="cx" style="display: block; padding: 0 10px"> . __( 'Live Preview' ) . '</a>';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -205,11 +198,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a href="<?php echo $preview_link; ?>" class="screenshot hide-if-customize">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <span class="screenshot hide-if-customize">
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php if ( $screenshot = $theme->get_screenshot() ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <img src="<?php echo esc_url( $screenshot ); ?>" alt="" />
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- </a>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ </span>
</ins><span class="cx" style="display: block; padding: 0 10px"> <a href="<?php echo wp_customize_url( $stylesheet ); ?>" class="screenshot load-customize hide-if-no-customize">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( $screenshot = $theme->get_screenshot() ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <img src="<?php echo esc_url( $screenshot ); ?>" alt="" />
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpupgraderskinsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-upgrader-skins.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-upgrader-skins.php 2015-07-29 18:12:26 UTC (rev 33491)
+++ trunk/src/wp-admin/includes/class-wp-upgrader-skins.php 2015-07-29 18:35:40 UTC (rev 33492)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -650,12 +650,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $stylesheet = $this->upgrader->result['destination_name'];
</span><span class="cx" style="display: block; padding: 0 10px"> $template = $theme_info->get_template();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $preview_link = add_query_arg( array(
- 'preview' => 1,
- 'template' => urlencode( $template ),
- 'stylesheet' => urlencode( $stylesheet ),
- ), trailingslashit( home_url() ) );
-
</del><span class="cx" style="display: block; padding: 0 10px"> $activate_link = add_query_arg( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'action' => 'activate',
</span><span class="cx" style="display: block; padding: 0 10px"> 'template' => urlencode( $template ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -664,7 +658,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $install_actions = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $install_actions['preview'] = '<a href="' . esc_url( $preview_link ) . '" class="hide-if-customize"><span aria-hidden="true">' . __( 'Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Preview “%s”' ), $name ) . '</span></a>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $install_actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview “%s”' ), $name ) . '</span></a>';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -732,12 +726,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $stylesheet = $this->upgrader->result['destination_name'];
</span><span class="cx" style="display: block; padding: 0 10px"> $template = $theme_info->get_template();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $preview_link = add_query_arg( array(
- 'preview' => 1,
- 'template' => urlencode( $template ),
- 'stylesheet' => urlencode( $stylesheet ),
- ), trailingslashit( home_url() ) );
-
</del><span class="cx" style="display: block; padding: 0 10px"> $activate_link = add_query_arg( array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'action' => 'activate',
</span><span class="cx" style="display: block; padding: 0 10px"> 'template' => urlencode( $template ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -750,7 +738,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $update_actions['preview'] = '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Customize' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Customize “%s”' ), $name ) . '</span></a>';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( current_user_can( 'switch_themes' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $update_actions['preview'] = '<a href="' . esc_url( $preview_link ) . '" class="hide-if-customize"><span aria-hidden="true">' . __( 'Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Preview “%s”' ), $name ) . '</span></a>';
</del><span class="cx" style="display: block; padding: 0 10px"> if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $update_actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview “%s”' ), $name ) . '</span></a>';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadminincludesthemephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/theme.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/theme.php 2015-07-29 18:12:26 UTC (rev 33491)
+++ trunk/src/wp-admin/includes/theme.php 2015-07-29 18:35:40 UTC (rev 33492)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -479,13 +479,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'actions' => array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null,
</span><span class="cx" style="display: block; padding: 0 10px"> 'customize' => ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) ? wp_customize_url( $slug ) : null,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'preview' => add_query_arg( array(
- 'preview' => 1,
- 'template' => urlencode( $theme->get_template() ),
- 'stylesheet' => urlencode( $slug ),
- 'preview_iframe' => true,
- 'TB_iframe' => true,
- ), home_url( '/' ) ),
</del><span class="cx" style="display: block; padding: 0 10px"> 'delete' => current_user_can( 'delete_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=delete&stylesheet=' . $encoded_slug ), 'delete-theme_' . $slug ) : null,
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span></span></pre></div>
<a id="trunksrcwpadminjscustomizecontrolsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/js/customize-controls.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/customize-controls.js 2015-07-29 18:12:26 UTC (rev 33491)
+++ trunk/src/wp-admin/js/customize-controls.js 2015-07-29 18:35:40 UTC (rev 33492)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3036,9 +3036,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Redirect to the fallback preview if any incompatibilities are found.
- if ( ! $.support.postMessage || ( ! $.support.cors && api.settings.isCrossDomain ) )
- return window.location = api.settings.url.fallback;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Bail if any incompatibilities are found.
+ if ( ! $.support.postMessage || ( ! $.support.cors && api.settings.isCrossDomain ) ) {
+ return;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> var parent, topFocus,
</span><span class="cx" style="display: block; padding: 0 10px"> body = $( document.body ),
</span></span></pre></div>
<a id="trunksrcwpadminthemesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/themes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/themes.php 2015-07-29 18:12:26 UTC (rev 33491)
+++ trunk/src/wp-admin/themes.php 2015-07-29 18:35:40 UTC (rev 33492)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -245,7 +245,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <a class="button button-secondary activate" href="<?php echo $theme['actions']['activate']; ?>"><?php _e( 'Activate' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Live Preview' ); ?></a>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a class="button button-secondary hide-if-customize" href="<?php echo $theme['actions']['preview']; ?>"><?php _e( 'Preview' ); ?></a>
</del><span class="cx" style="display: block; padding: 0 10px"> <?php } ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php } ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -347,7 +346,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <# } else { #>
</span><span class="cx" style="display: block; padding: 0 10px"> <a class="button button-secondary activate" href="{{{ data.actions.activate }}}"><?php _e( 'Activate' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px"> <a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a class="button button-secondary hide-if-customize" href="{{{ data.actions.preview }}}"><?php _e( 'Preview' ); ?></a>
</del><span class="cx" style="display: block; padding: 0 10px"> <# } #>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -409,7 +407,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="{{{ data.actions.activate }}}" class="button button-secondary activate"><?php _e( 'Activate' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px"> <# } #>
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="{{{ data.actions.customize }}}" class="button button-primary load-customize hide-if-no-customize"><?php _e( 'Live Preview' ); ?></a>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <a href="{{{ data.actions.preview }}}" class="button button-secondary hide-if-customize"><?php _e( 'Preview' ); ?></a>
</del><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <# if ( ! data.active && data.actions['delete'] ) { #>
</span></span></pre></div>
<a id="trunksrcwpincludesdefaultfiltersphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/default-filters.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/default-filters.php 2015-07-29 18:12:26 UTC (rev 33491)
+++ trunk/src/wp-includes/default-filters.php 2015-07-29 18:35:40 UTC (rev 33492)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -335,7 +335,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters formerly mixed into wp-includes
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> // Theme
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-add_action( 'setup_theme', 'preview_theme' );
</del><span class="cx" style="display: block; padding: 0 10px"> add_action( 'wp_loaded', '_custom_header_background_just_in_time' );
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'plugins_loaded', '_wp_customize_include' );
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' );
</span></span></pre></div>
<a id="trunksrcwpincludesdeprecatedphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/deprecated.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/deprecated.php 2015-07-29 18:12:26 UTC (rev 33491)
+++ trunk/src/wp-includes/deprecated.php 2015-07-29 18:35:40 UTC (rev 33492)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3493,6 +3493,79 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Start preview theme output buffer.
+ *
+ * Will only perform task if the user has permissions and template and preview
+ * query variables exist.
+ *
+ * @since 2.6.0
+ * @deprecated 4.3.0
+ */
+function preview_theme() {
+ _deprecated_function( __FUNCTION__, '4.3' );
+}
+
+/**
+ * Private function to modify the current template when previewing a theme
+ *
+ * @since 2.9.0
+ * @deprecated 4.3.0
+ * @access private
+ *
+ * @return string
+ */
+function _preview_theme_template_filter() {
+ _deprecated_function( __FUNCTION__, '4.3' );
+ return '';
+}
+
+/**
+ * Private function to modify the current stylesheet when previewing a theme
+ *
+ * @since 2.9.0
+ * @deprecated 4.3.0
+ * @access private
+ *
+ * @return string
+ */
+function _preview_theme_stylesheet_filter() {
+ _deprecated_function( __FUNCTION__, '4.3' );
+ return '';
+}
+
+/**
+ * Callback function for ob_start() to capture all links in the theme.
+ *
+ * @since 2.6.0
+ * @deprecated 4.3.0
+ * @access private
+ *
+ * @param string $content
+ * @return string
+ */
+function preview_theme_ob_filter( $content ) {
+ _deprecated_function( __FUNCTION__, '4.3' );
+ return $content;
+}
+
+/**
+ * Manipulates preview theme links in order to control and maintain location.
+ *
+ * Callback function for preg_replace_callback() to accept and filter matches.
+ *
+ * @since 2.6.0
+ * @deprecated 4.3.0
+ * @access private
+ *
+ * @param array $matches
+ * @return string
+ */
+function preview_theme_ob_filter_callback( $matches ) {
+ _deprecated_function( __FUNCTION__, '4.3' );
+ return '';
+}
+
+/**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Formats text for the rich text editor.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * The filter 'richedit_pre' is applied here. If $text is empty the filter will
</span></span></pre></div>
<a id="trunksrcwpincludesthemephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/theme.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/theme.php 2015-07-29 18:12:26 UTC (rev 33491)
+++ trunk/src/wp-includes/theme.php 2015-07-29 18:35:40 UTC (rev 33492)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -661,116 +661,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Start preview theme output buffer.
- *
- * Will only perform task if the user has permissions and template and preview
- * query variables exist.
- *
- * @since 2.6.0
- */
-function preview_theme() {
- if ( ! (isset($_GET['template']) && isset($_GET['preview'])) )
- return;
-
- if ( !current_user_can( 'switch_themes' ) )
- return;
-
- // Admin Thickbox requests
- if ( isset( $_GET['preview_iframe'] ) )
- show_admin_bar( false );
-
- $_GET['template'] = preg_replace('|[^a-z0-9_./-]|i', '', $_GET['template']);
-
- if ( validate_file($_GET['template']) )
- return;
-
- add_filter( 'template', '_preview_theme_template_filter' );
-
- if ( isset($_GET['stylesheet']) ) {
- $_GET['stylesheet'] = preg_replace('|[^a-z0-9_./-]|i', '', $_GET['stylesheet']);
- if ( validate_file($_GET['stylesheet']) )
- return;
- add_filter( 'stylesheet', '_preview_theme_stylesheet_filter' );
- }
-
- // 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' );
-}
-
-/**
- * Private function to modify the current template when previewing a theme
- *
- * @since 2.9.0
- * @access private
- *
- * @return string
- */
-function _preview_theme_template_filter() {
- return isset($_GET['template']) ? $_GET['template'] : '';
-}
-
-/**
- * Private function to modify the current stylesheet when previewing a theme
- *
- * @since 2.9.0
- * @access private
- *
- * @return string
- */
-function _preview_theme_stylesheet_filter() {
- return isset($_GET['stylesheet']) ? $_GET['stylesheet'] : '';
-}
-
-/**
- * Callback function for ob_start() to capture all links in the theme.
- *
- * @since 2.6.0
- * @access private
- *
- * @param string $content
- * @return string
- */
-function preview_theme_ob_filter( $content ) {
- return preg_replace_callback( "|(<a.*?href=([\"']))(.*?)([\"'].*?>)|", 'preview_theme_ob_filter_callback', $content );
-}
-
-/**
- * Manipulates preview theme links in order to control and maintain location.
- *
- * Callback function for preg_replace_callback() to accept and filter matches.
- *
- * @since 2.6.0
- * @access private
- *
- * @param array $matches
- * @return string
- */
-function preview_theme_ob_filter_callback( $matches ) {
- if ( strpos($matches[4], 'onclick') !== false )
- $matches[4] = preg_replace('#onclick=([\'"]).*?(?<!\\\)\\1#i', '', $matches[4]); //Strip out any onclicks from rest of <a>. (?<!\\\) means to ignore the '" if it's escaped by \ to prevent breaking mid-attribute.
- if (
- ( false !== strpos($matches[3], '/wp-admin/') )
- ||
- ( false !== strpos( $matches[3], '://' ) && 0 !== strpos( $matches[3], home_url() ) )
- ||
- ( false !== strpos($matches[3], '/feed/') )
- ||
- ( false !== strpos($matches[3], '/trackback/') )
- )
- return $matches[1] . "#$matches[2] onclick=$matches[2]return false;" . $matches[4];
-
- $stylesheet = isset( $_GET['stylesheet'] ) ? $_GET['stylesheet'] : '';
- $template = isset( $_GET['template'] ) ? $_GET['template'] : '';
-
- $link = add_query_arg( array( 'preview' => 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];
-}
-
-/**
</del><span class="cx" style="display: block; padding: 0 10px"> * Switches the theme.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Accepts one argument: $stylesheet of the theme. It also accepts an additional function signature
</span></span></pre>
</div>
</div>
</body>
</html>