<!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>[36837] trunk/src: Customize: Site logos are custom logos.</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/36837">36837</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/36837","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>obenland</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-03-03 19:55:15 +0000 (Thu, 03 Mar 2016)</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'>Customize: Site logos are custom logos.
Brings the nomenclature closer to custom headers and backgrounds.
See https://wordpress.slack.com/archives/core/p1456955151003150
See <a href="https://core.trac.wordpress.org/ticket/35945">#35945</a>. </pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincsscustomizecontrolscss">trunk/src/wp-admin/css/customize-controls.css</a></li>
<li><a href="#trunksrcwpadminincludesadminphp">trunk/src/wp-admin/includes/admin.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpsitelogophp">trunk/src/wp-admin/includes/class-wp-site-logo.php</a></li>
<li><a href="#trunksrcwpadminjscustomizecontrolsjs">trunk/src/wp-admin/js/customize-controls.js</a></li>
<li><a href="#trunksrcwpincludesclasswpcustomizemanagerphp">trunk/src/wp-includes/class-wp-customize-manager.php</a></li>
<li><a href="#trunksrcwpincludescustomizeclasswpcustomizesitelogocontrolphp">trunk/src/wp-includes/customize/class-wp-customize-site-logo-control.php</a></li>
<li><a href="#trunksrcwpincludesgeneraltemplatephp">trunk/src/wp-includes/general-template.php</a></li>
<li><a href="#trunksrcwpincludesjscustomizepreviewjs">trunk/src/wp-includes/js/customize-preview.js</a></li>
<li><a href="#trunksrcwpincludesposttemplatephp">trunk/src/wp-includes/post-template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincsscustomizecontrolscss"></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/css/customize-controls.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/customize-controls.css 2016-03-03 16:06:41 UTC (rev 36836)
+++ trunk/src/wp-admin/css/customize-controls.css 2016-03-03 19:55:15 UTC (rev 36837)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -721,7 +721,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-background .current,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-cropped_image .current,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .current,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.customize-control-site_logo .current,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-custom_logo .current,
</ins><span class="cx" style="display: block; padding: 0 10px"> .customize-control-header .current {
</span><span class="cx" style="display: block; padding: 0 10px"> margin-bottom: 8px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -763,9 +763,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .remove-button,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .default-button,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .upload-button,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.customize-control-site_logo .remove-button,
-.customize-control-site_logo .default-button,
-.customize-control-site_logo .upload-button,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-custom_logo .remove-button,
+.customize-control-custom_logo .default-button,
+.customize-control-custom_logo .upload-button,
</ins><span class="cx" style="display: block; padding: 0 10px"> .customize-control-header button.new,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-header button.remove {
</span><span class="cx" style="display: block; padding: 0 10px"> white-space: normal;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -779,7 +779,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-background .current .container,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-cropped_image .current .container,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .current .container,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.customize-control-site_logo .current .container,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-custom_logo .current .container,
</ins><span class="cx" style="display: block; padding: 0 10px"> .customize-control-header .current .container {
</span><span class="cx" style="display: block; padding: 0 10px"> overflow: hidden;
</span><span class="cx" style="display: block; padding: 0 10px"> -webkit-border-radius: 2px;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -793,7 +793,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-background .current .container,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-cropped_image .current .container,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .current .container,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.customize-control-site_logo .current .container,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-custom_logo .current .container,
</ins><span class="cx" style="display: block; padding: 0 10px"> .customize-control-image .current .container {
</span><span class="cx" style="display: block; padding: 0 10px"> min-height: 40px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -822,7 +822,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-background .inner,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-cropped_image .inner,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .inner,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.customize-control-site_logo .inner,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-custom_logo .inner,
</ins><span class="cx" style="display: block; padding: 0 10px"> .customize-control-header .inner {
</span><span class="cx" style="display: block; padding: 0 10px"> display: none;
</span><span class="cx" style="display: block; padding: 0 10px"> position: absolute;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -838,7 +838,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-background .inner,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-cropped_image .inner,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .inner,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.customize-control-site_logo .inner,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-custom_logo .inner,
</ins><span class="cx" style="display: block; padding: 0 10px"> .customize-control-image .inner {
</span><span class="cx" style="display: block; padding: 0 10px"> display: block;
</span><span class="cx" style="display: block; padding: 0 10px"> min-height: 40px;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -850,7 +850,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-background .inner,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-cropped_image .inner,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .inner,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.customize-control-site_logo.inner,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-custom_logo.inner,
</ins><span class="cx" style="display: block; padding: 0 10px"> .customize-control-header .inner,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-header .inner .dashicons {
</span><span class="cx" style="display: block; padding: 0 10px"> line-height: 20px;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -994,8 +994,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-cropped_image .default-button,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .remove-button,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .default-button,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.customize-control-site_logo .remove-button,
-.customize-control-site_logo .default-button,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-custom_logo .remove-button,
+.customize-control-custom_logo .default-button,
</ins><span class="cx" style="display: block; padding: 0 10px"> .customize-control-header .remove {
</span><span class="cx" style="display: block; padding: 0 10px"> float: left;
</span><span class="cx" style="display: block; padding: 0 10px"> margin-right: 3px;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1007,7 +1007,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-background .upload-button,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-cropped_image .upload-button,
</span><span class="cx" style="display: block; padding: 0 10px"> .customize-control-site_icon .upload-button,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.customize-control-site_logo .upload-button,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.customize-control-custom_logo .upload-button,
</ins><span class="cx" style="display: block; padding: 0 10px"> .customize-control-header .new {
</span><span class="cx" style="display: block; padding: 0 10px"> float: right;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadminincludesadminphp"></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/admin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/admin.php 2016-03-03 16:06:41 UTC (rev 36836)
+++ trunk/src/wp-admin/includes/admin.php 2016-03-03 19:55:15 UTC (rev 36837)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -72,7 +72,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** WordPress Site Icon API */
</span><span class="cx" style="display: block; padding: 0 10px"> require_once(ABSPATH . 'wp-admin/includes/class-wp-site-icon.php');
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/** WordPress Site Logo API */
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/** WordPress Custom Logo API */
</ins><span class="cx" style="display: block; padding: 0 10px"> require_once(ABSPATH . 'wp-admin/includes/class-wp-site-logo.php');
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /** WordPress Update Administration API */
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpsitelogophp"></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-site-logo.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-site-logo.php 2016-03-03 16:06:41 UTC (rev 36836)
+++ trunk/src/wp-admin/includes/class-wp-site-logo.php 2016-03-03 19:55:15 UTC (rev 36837)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,6 +1,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Administration API: WP_Site_Logo class
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Administration API: WP_Custom_Logo class
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @package WordPress
</span><span class="cx" style="display: block; padding: 0 10px"> * @subpackage Administration
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8,11 +8,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">- * Core class used to implement site logo functionality.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Core class used to implement custom logo functionality.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-class WP_Site_Logo {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+class WP_Custom_Logo {
</ins><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"> * Get current logo settings stored in theme mod.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,13 +34,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function head_text_styles() {
</span><span class="cx" style="display: block; padding: 0 10px"> // Bail if our theme supports custom headers.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( current_theme_supports( 'custom-header' ) || get_theme_mod( 'site_logo_header_text', true ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( current_theme_supports( 'custom-header' ) || get_theme_mod( 'custom_logo_header_text', true ) ) {
</ins><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><span class="cx" style="display: block; padding: 0 10px"> // Is Display Header Text unchecked? If so, hide the header text.
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <!-- Site Logo: hide header text -->
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <!-- Custom Logo: hide header text -->
</ins><span class="cx" style="display: block; padding: 0 10px"> <style type="text/css">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php echo sanitize_html_class( $this->header_text_classes() ); ?> {
</span><span class="cx" style="display: block; padding: 0 10px"> position: absolute;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -51,7 +51,7 @@
</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">- * Resets the site logo if the current logo is deleted in the media manager.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Reset the custom logo if the current logo is deleted in the media manager.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -59,10 +59,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $post_id Post ID.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function delete_attachment_data( $post_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $site_logo_id = get_theme_mod( 'site_logo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $custom_logo_id = get_theme_mod( 'custom_logo' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $site_logo_id && $site_logo_id == $post_id ) {
- remove_theme_mod( 'site_logo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $custom_logo_id && $custom_logo_id == $post_id ) {
+ remove_theme_mod( 'custom_logo' );
</ins><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><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -105,7 +105,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string String of classes to hide.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected function header_text_classes() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $args = get_theme_support( 'site-logo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $args = get_theme_support( 'custom-logo' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $args[0]['header-text'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Use any classes defined in add_theme_support().
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -131,8 +131,8 @@
</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">- * WP_Site_Logo instance.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * WP_Custom_Logo instance.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @global WP_Site_Logo $wp_site_logo
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @global WP_Custom_Logo $wp_custom_logo
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-$GLOBALS['wp_site_logo'] = new WP_Site_Logo;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+$GLOBALS['wp_custom_logo'] = new WP_Custom_Logo;
</ins></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 2016-03-03 16:06:41 UTC (rev 36836)
+++ trunk/src/wp-admin/js/customize-controls.js 2016-03-03 19:55:15 UTC (rev 36837)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2303,14 +2303,14 @@
</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 control for selecting Site Logos.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * A control for selecting custom logos.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @class
</span><span class="cx" style="display: block; padding: 0 10px"> * @augments wp.customize.MediaControl
</span><span class="cx" style="display: block; padding: 0 10px"> * @augments wp.customize.Control
</span><span class="cx" style="display: block; padding: 0 10px"> * @augments wp.customize.Class
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- api.SiteLogoControl = api.MediaControl.extend({
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ api.CustomLogoControl = api.MediaControl.extend({
</ins><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"> * When the control's DOM structure is ready,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2330,7 +2330,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> control.setting.bind( function( attachmentId ) {
</span><span class="cx" style="display: block; padding: 0 10px"> wp.media.attachment( attachmentId ).fetch().done( function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp.customize.previewer.send( 'site-logo-attachment-data', this.attributes );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp.customize.previewer.send( 'custom-logo-attachment-data', this.attributes );
</ins><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"> // Re-render whenever the control's setting changes.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3245,7 +3245,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> image: api.ImageControl,
</span><span class="cx" style="display: block; padding: 0 10px"> cropped_image: api.CroppedImageControl,
</span><span class="cx" style="display: block; padding: 0 10px"> site_icon: api.SiteIconControl,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- site_logo: api.SiteLogoControl,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ custom_logo: api.CustomLogoControl,
</ins><span class="cx" style="display: block; padding: 0 10px"> header: api.HeaderControl,
</span><span class="cx" style="display: block; padding: 0 10px"> background: api.BackgroundControl,
</span><span class="cx" style="display: block; padding: 0 10px"> theme: api.ThemeControl
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpcustomizemanagerphp"></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/class-wp-customize-manager.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-customize-manager.php 2016-03-03 16:06:41 UTC (rev 36836)
+++ trunk/src/wp-includes/class-wp-customize-manager.php 2016-03-03 19:55:15 UTC (rev 36837)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1848,7 +1848,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->register_control_type( 'WP_Customize_Background_Image_Control' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->register_control_type( 'WP_Customize_Cropped_Image_Control' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->register_control_type( 'WP_Customize_Site_Icon_Control' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->register_control_type( 'WP_Customize_Site_Logo_Control' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->register_control_type( 'WP_Customize_Custom_Logo_Control' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->register_control_type( 'WP_Customize_Theme_Control' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /* Themes */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1960,22 +1960,22 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'width' => 512,
</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">- $this->add_setting( 'site_logo', array(
- 'theme_supports' => array( 'site-logo' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->add_setting( 'custom_logo', array(
+ 'theme_supports' => array( 'custom-logo' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'transport' => 'postMessage',
</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">- $this->add_control( new WP_Customize_Site_Logo_Control( $this, 'site_logo', array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->add_control( new WP_Customize_Custom_Logo_Control( $this, 'custom_logo', array(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'label' => __( 'Logo' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'section' => 'title_tagline',
</span><span class="cx" style="display: block; padding: 0 10px"> 'priority' => 0,
</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"> if ( isset( $this->selective_refresh ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->selective_refresh->add_partial( 'site_logo', array(
- 'settings' => array( 'site_logo' ),
- 'selector' => '.site-logo-link',
- 'render_callback' => array( $this, '_render_site_logo_partial' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->selective_refresh->add_partial( 'custom_logo', array(
+ 'settings' => array( 'custom_logo' ),
+ 'selector' => '.custom-logo-link',
+ 'render_callback' => array( $this, '_render_custom_logo_partial' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> 'container_inclusive' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2211,10 +2211,10 @@
</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">- * Callback for rendering the site logo, used in the site_logo partial.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Callback for rendering the custom logo, used in the custom_logo partial.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * This method exists because the partial object and context data are passed
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * into a partial's render_callback so we cannot use get_the_site_logo() as
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * into a partial's render_callback so we cannot use get_custom_logo() as
</ins><span class="cx" style="display: block; padding: 0 10px"> * the render_callback directly since it expects a blog ID as the first
</span><span class="cx" style="display: block; padding: 0 10px"> * argument. When WP no longer supports PHP 5.3, this method can be removed
</span><span class="cx" style="display: block; padding: 0 10px"> * in favor of an anonymous function.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2224,10 +2224,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @access private
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return string Site logo.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string Custom logo.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public function _render_site_logo_partial() {
- return get_the_site_logo();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function _render_custom_logo_partial() {
+ return get_custom_logo();
</ins><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></span></pre></div>
<a id="trunksrcwpincludescustomizeclasswpcustomizesitelogocontrolphp"></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/customize/class-wp-customize-site-logo-control.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/customize/class-wp-customize-site-logo-control.php 2016-03-03 16:06:41 UTC (rev 36836)
+++ trunk/src/wp-includes/customize/class-wp-customize-site-logo-control.php 2016-03-03 19:55:15 UTC (rev 36837)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,6 +1,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Customize API: WP_Customize_Site_Logo_Control class
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Customize API: WP_Customize_Custom_Logo_Control class
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @package WordPress
</span><span class="cx" style="display: block; padding: 0 10px"> * @subpackage Customize
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8,7 +8,7 @@
</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">- * Customize Site Logo control class.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Customize custom logo control class.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Used only for custom functionality in JavaScript.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -16,7 +16,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see WP_Customize_Image_Control
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-class WP_Customize_Site_Logo_Control extends WP_Customize_Image_Control {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+class WP_Customize_Custom_Logo_Control extends WP_Customize_Image_Control {
</ins><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"> * Control type.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,7 +25,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="cx" style="display: block; padding: 0 10px"> * @var string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- public $type = 'site_logo';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public $type = 'custom_logo';
</ins><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"> * Constructor.
</span></span></pre></div>
<a id="trunksrcwpincludesgeneraltemplatephp"></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/general-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/general-template.php 2016-03-03 16:06:41 UTC (rev 36836)
+++ trunk/src/wp-includes/general-template.php 2016-03-03 19:55:15 UTC (rev 36837)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -839,56 +839,56 @@
</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">- * Whether the site has a Site Logo.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Whether the site has a custom logo.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $blog_id Optional. ID of the blog in question. Default current blog.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return bool Whether the site has a site logo or not.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return bool Whether the site has a custom logo or not.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function has_site_logo( $blog_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function has_custom_logo( $blog_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> switch_to_blog( $blog_id );
</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">- $site_logo_id = get_theme_mod( 'site_logo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $custom_logo_id = get_theme_mod( 'custom_logo' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() && ms_is_switched() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> restore_current_blog();
</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">- return (bool) $site_logo_id;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return (bool) $custom_logo_id;
</ins><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">- * Returns a Site Logo, linked to home.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Returns a custom logo, linked to home.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $blog_id Optional. ID of the blog in question. Default current blog.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return string Site logo markup.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string Custom logo markup.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function get_the_site_logo( $blog_id = 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function get_custom_logo( $blog_id = 0 ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $html = '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> switch_to_blog( $blog_id );
</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">- $site_logo_id = get_theme_mod( 'site_logo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $custom_logo_id = get_theme_mod( 'custom_logo' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() && ms_is_switched() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> restore_current_blog();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $size = get_theme_support( 'site-logo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $size = get_theme_support( 'custom-logo' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $size = $size[0]['size'];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // We have a logo. Logo is go.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $site_logo_id ) {
- $html = sprintf( '<a href="%1$s" class="site-logo-link" rel="home" itemprop="url">%2$s</a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $custom_logo_id ) {
+ $html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
</ins><span class="cx" style="display: block; padding: 0 10px"> esc_url( home_url( '/' ) ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_get_attachment_image( $site_logo_id, $size, false, array(
- 'class' => "site-logo attachment-$size",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp_get_attachment_image( $custom_logo_id, $size, false, array(
+ 'class' => "custom-logo attachment-$size",
</ins><span class="cx" style="display: block; padding: 0 10px"> 'data-size' => $size,
</span><span class="cx" style="display: block; padding: 0 10px"> 'itemprop' => 'logo',
</span><span class="cx" style="display: block; padding: 0 10px"> ) )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -897,32 +897,32 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If no logo is set but we're in the Customizer, leave a placeholder (needed for the live preview).
</span><span class="cx" style="display: block; padding: 0 10px"> elseif ( is_customize_preview() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $html = sprintf( '<a href="%1$s" class="site-logo-link" style="display:none;"><img class="site-logo" data-size="%2$s" /></a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $html = sprintf( '<a href="%1$s" class="custom-logo-link" style="display:none;"><img class="custom-logo" data-size="%2$s" /></a>',
</ins><span class="cx" style="display: block; padding: 0 10px"> esc_url( home_url( '/' ) ),
</span><span class="cx" style="display: block; padding: 0 10px"> esc_attr( $size )
</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><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Filter the Site Logo output.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Filter the custom logo output.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $html Site Logo HTML output.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $html Custom logo HTML output.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $size Size specified in add_theme_support declaration, or 'thumbnail' default.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return apply_filters( 'get_the_site_logo', $html, $size );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return apply_filters( 'get_custom_logo', $html, $size );
</ins><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">- * Displays a Site Logo, linked to home.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Displays a custom logo, linked to home.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $blog_id Optional. ID of the blog in question. Default current blog.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-function the_site_logo( $blog_id = 0 ) {
- echo get_the_site_logo( $blog_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+function the_custom_logo( $blog_id = 0 ) {
+ echo get_custom_logo( $blog_id );
</ins><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></span></pre></div>
<a id="trunksrcwpincludesjscustomizepreviewjs"></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/js/customize-preview.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/customize-preview.js 2016-03-03 16:06:41 UTC (rev 36836)
+++ trunk/src/wp-includes/js/customize-preview.js 2016-03-03 19:55:15 UTC (rev 36837)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -224,9 +224,9 @@
</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">- * Site Logo
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Custom Logo
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * The site logo setting only contains the attachment ID. To avoid having to send an AJAX request to get more
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * The custom logo setting only contains the attachment ID. To avoid having to send an AJAX request to get more
</ins><span class="cx" style="display: block; padding: 0 10px"> * data, we send a separate message with the attachment data we get from the Customizer's media modal.
</span><span class="cx" style="display: block; padding: 0 10px"> * Therefore first callback handles only the event of a new logo being selected.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -234,8 +234,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- api.preview.bind( 'site-logo-attachment-data', function( attachment ) {
- var $logo = $( '.site-logo' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ api.preview.bind( 'custom-logo-attachment-data', function( attachment ) {
+ var $logo = $( '.custom-logo' ),
</ins><span class="cx" style="display: block; padding: 0 10px"> size = $logo.data( 'size' ),
</span><span class="cx" style="display: block; padding: 0 10px"> srcset = [];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -255,27 +255,25 @@
</span><span class="cx" style="display: block; padding: 0 10px"> srcset: srcset
</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">- $( '.site-logo-link' ).show();
- $( 'body' ).addClass( 'wp-site-logo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $( '.custom-logo-link' ).show();
</ins><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">- api( 'site_logo', function( setting ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ api( 'custom_logo', function( setting ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> setting.bind( function( newValue ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! newValue ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $( '.site-logo-link' ).hide();
- $( 'body' ).removeClass( 'wp-site-logo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $( '.custom-logo-link' ).hide();
</ins><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">- // Focus on the control when the logo is clicked, if there is no site_logo partial.
- if ( ! api.selectiveRefresh || ! api.selectiveRefresh.partial.has( 'site_logo' ) ) {
- $( document.body ).on( 'click', '.site-logo-link', function( e ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Focus on the control when the logo is clicked, if there is no custom_logo partial.
+ if ( ! api.selectiveRefresh || ! api.selectiveRefresh.partial.has( 'custom_logo' ) ) {
+ $( document.body ).on( 'click', '.custom-logo-link', function( e ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! e.shiftKey ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- api.preview.send( 'focus-control-for-setting', 'site_logo' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ api.preview.send( 'focus-control-for-setting', 'custom_logo' );
</ins><span class="cx" style="display: block; padding: 0 10px"> } );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $( '.site-logo-link' ).attr( 'title', api.settings.l10n.shiftClickToEdit );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $( '.custom-logo-link' ).attr( 'title', api.settings.l10n.shiftClickToEdit );
</ins><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></span></pre></div>
<a id="trunksrcwpincludesposttemplatephp"></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/post-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/post-template.php 2016-03-03 16:06:41 UTC (rev 36836)
+++ trunk/src/wp-includes/post-template.php 2016-03-03 19:55:15 UTC (rev 36837)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -706,10 +706,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( get_background_color() !== get_theme_support( 'custom-background', 'default-color' ) || get_background_image() )
</span><span class="cx" style="display: block; padding: 0 10px"> $classes[] = 'custom-background';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( has_site_logo() ) {
- $classes[] = 'wp-site-logo';
- }
-
</del><span class="cx" style="display: block; padding: 0 10px"> $page = $wp_query->get( 'page' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $page || $page < 2 )
</span></span></pre>
</div>
</div>
</body>
</html>