<!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>[28481] trunk/src/wp-admin: Use proper access modifiers and add a magic `__get()` method to `Custom_Background` and `Custom_Image_Header`.</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">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/28481">28481</a></dd>
<dt>Author</dt> <dd>wonderboymusic</dd>
<dt>Date</dt> <dd>2014-05-18 21:30:43 +0000 (Sun, 18 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use proper access modifiers and add a magic `__get()` method to `Custom_Background` and `Custom_Image_Header`.
See <a href="http://core.trac.wordpress.org/ticket/27881">#27881</a>, <a href="http://core.trac.wordpress.org/ticket/22234">#22234</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincustombackgroundphp">trunk/src/wp-admin/custom-background.php</a></li>
<li><a href="#trunksrcwpadmincustomheaderphp">trunk/src/wp-admin/custom-header.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincustombackgroundphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/custom-background.php (28480 => 28481)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/custom-background.php 2014-05-18 21:14:13 UTC (rev 28480)
+++ trunk/src/wp-admin/custom-background.php 2014-05-18 21:30:43 UTC (rev 28481)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $admin_header_callback;
</del><ins>+ private $admin_header_callback;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Callback for header div.
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $admin_image_div_callback;
</del><ins>+ private $admin_image_div_callback;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Holds the page menu hook.
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $page = '';
</del><ins>+ private $page = '';
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Constructor - Register administration header callback.
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> * @param callback $admin_image_div_callback Optional custom image div output callback.
</span><span class="cx"> * @return Custom_Background
</span><span class="cx"> */
</span><del>- function __construct($admin_header_callback = '', $admin_image_div_callback = '') {
</del><ins>+ public function __construct($admin_header_callback = '', $admin_image_div_callback = '') {
</ins><span class="cx"> $this->admin_header_callback = $admin_header_callback;
</span><span class="cx"> $this->admin_image_div_callback = $admin_image_div_callback;
</span><span class="cx">
</span><span class="lines">@@ -59,11 +59,22 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * Make private properties readable for backwards compatibility
+ *
+ * @since 4.0.0
+ * @param string $name
+ * @return mixed
+ */
+ public function __get( $name ) {
+ return $this->$name;
+ }
+
+ /**
</ins><span class="cx"> * Set up the hooks for the Custom Background admin page.
</span><span class="cx"> *
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> */
</span><del>- function init() {
</del><ins>+ public function init() {
</ins><span class="cx"> if ( ! current_user_can('edit_theme_options') )
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -82,7 +93,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> */
</span><del>- function admin_load() {
</del><ins>+ public function admin_load() {
</ins><span class="cx"> get_current_screen()->add_help_tab( array(
</span><span class="cx"> 'id' => 'overview',
</span><span class="cx"> 'title' => __('Overview'),
</span><span class="lines">@@ -109,7 +120,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> */
</span><del>- function take_action() {
</del><ins>+ public function take_action() {
</ins><span class="cx">
</span><span class="cx"> if ( empty($_POST) )
</span><span class="cx"> return;
</span><span class="lines">@@ -176,7 +187,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> */
</span><del>- function admin_page() {
</del><ins>+ public function admin_page() {
</ins><span class="cx"> ?>
</span><span class="cx"> <div class="wrap" id="custom-background">
</span><span class="cx"> <h2><?php _e( 'Custom Background' ); ?></h2>
</span><span class="lines">@@ -343,7 +354,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> */
</span><del>- function handle_upload() {
</del><ins>+ public function handle_upload() {
</ins><span class="cx">
</span><span class="cx"> if ( empty($_FILES) )
</span><span class="cx"> return;
</span><span class="lines">@@ -397,7 +408,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.4.0
</span><span class="cx"> */
</span><del>- function attachment_fields_to_edit( $form_fields ) {
</del><ins>+ public function attachment_fields_to_edit( $form_fields ) {
</ins><span class="cx"> return $form_fields;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -406,7 +417,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.4.0
</span><span class="cx"> */
</span><del>- function filter_upload_tabs( $tabs ) {
</del><ins>+ public function filter_upload_tabs( $tabs ) {
</ins><span class="cx"> return $tabs;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunksrcwpadmincustomheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/custom-header.php (28480 => 28481)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/custom-header.php 2014-05-18 21:14:13 UTC (rev 28480)
+++ trunk/src/wp-admin/custom-header.php 2014-05-18 21:30:43 UTC (rev 28481)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $admin_header_callback;
</del><ins>+ private $admin_header_callback;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Callback for header div.
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $admin_image_div_callback;
</del><ins>+ private $admin_image_div_callback;
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Holds default headers.
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $default_headers = array();
</del><ins>+ private $default_headers = array();
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Holds custom headers uploaded by the user.
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> * @since 3.2.0
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $uploaded_headers = array();
</del><ins>+ private $uploaded_headers = array();
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Holds the page menu hook.
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> * @access private
</span><span class="cx"> */
</span><del>- var $page = '';
</del><ins>+ private $page = '';
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Constructor - Register administration header callback.
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> * @param callback $admin_image_div_callback Optional custom image div output callback.
</span><span class="cx"> * @return Custom_Image_Header
</span><span class="cx"> */
</span><del>- function __construct($admin_header_callback, $admin_image_div_callback = '') {
</del><ins>+ public function __construct($admin_header_callback, $admin_image_div_callback = '') {
</ins><span class="cx"> $this->admin_header_callback = $admin_header_callback;
</span><span class="cx"> $this->admin_image_div_callback = $admin_image_div_callback;
</span><span class="cx">
</span><span class="lines">@@ -81,11 +81,22 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><ins>+ * Make private properties readable for backwards compatibility
+ *
+ * @since 4.0.0
+ * @param string $name
+ * @return mixed
+ */
+ public function __get( $name ) {
+ return $this->$name;
+ }
+
+ /**
</ins><span class="cx"> * Set up the hooks for the Custom Header admin page.
</span><span class="cx"> *
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> */
</span><del>- function init() {
</del><ins>+ public function init() {
</ins><span class="cx"> if ( ! current_user_can('edit_theme_options') )
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -106,7 +117,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> */
</span><del>- function help() {
</del><ins>+ public function help() {
</ins><span class="cx"> get_current_screen()->add_help_tab( array(
</span><span class="cx"> 'id' => 'overview',
</span><span class="cx"> 'title' => __('Overview'),
</span><span class="lines">@@ -148,7 +159,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return int Current step
</span><span class="cx"> */
</span><del>- function step() {
</del><ins>+ public function step() {
</ins><span class="cx"> if ( ! isset( $_GET['step'] ) )
</span><span class="cx"> return 1;
</span><span class="cx">
</span><span class="lines">@@ -167,7 +178,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> */
</span><del>- function js_includes() {
</del><ins>+ public function js_includes() {
</ins><span class="cx"> $step = $this->step();
</span><span class="cx">
</span><span class="cx"> if ( ( 1 == $step || 3 == $step ) ) {
</span><span class="lines">@@ -185,7 +196,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.7.0
</span><span class="cx"> */
</span><del>- function css_includes() {
</del><ins>+ public function css_includes() {
</ins><span class="cx"> $step = $this->step();
</span><span class="cx">
</span><span class="cx"> if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) )
</span><span class="lines">@@ -199,7 +210,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.6.0
</span><span class="cx"> */
</span><del>- function take_action() {
</del><ins>+ public function take_action() {
</ins><span class="cx"> if ( ! current_user_can('edit_theme_options') )
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -245,7 +256,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> */
</span><del>- function process_default_headers() {
</del><ins>+ public function process_default_headers() {
</ins><span class="cx"> global $_wp_default_headers;
</span><span class="cx">
</span><span class="cx"> if ( !empty($this->headers) )
</span><span class="lines">@@ -275,7 +286,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> */
</span><del>- function show_header_selector( $type = 'default' ) {
</del><ins>+ public function show_header_selector( $type = 'default' ) {
</ins><span class="cx"> if ( 'default' == $type ) {
</span><span class="cx"> $headers = $this->default_headers;
</span><span class="cx"> } else {
</span><span class="lines">@@ -312,7 +323,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> */
</span><del>- function js() {
</del><ins>+ public function js() {
</ins><span class="cx"> $step = $this->step();
</span><span class="cx"> if ( ( 1 == $step || 3 == $step ) && current_theme_supports( 'custom-header', 'header-text' ) )
</span><span class="cx"> $this->js_1();
</span><span class="lines">@@ -325,7 +336,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.6.0
</span><span class="cx"> */
</span><del>- function js_1() {
</del><ins>+ public function js_1() {
</ins><span class="cx"> $default_color = '';
</span><span class="cx"> if ( current_theme_supports( 'custom-header', 'default-text-color' ) ) {
</span><span class="cx"> $default_color = get_theme_support( 'custom-header', 'default-text-color' );
</span><span class="lines">@@ -341,13 +352,13 @@
</span><span class="cx"> var default_color = '<?php echo $default_color; ?>',
</span><span class="cx"> header_text_fields;
</span><span class="cx">
</span><del>- function pickColor(color) {
</del><ins>+ public function pickColor(color) {
</ins><span class="cx"> $('#name').css('color', color);
</span><span class="cx"> $('#desc').css('color', color);
</span><span class="cx"> $('#text-color').val(color);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function toggle_text() {
</del><ins>+ public function toggle_text() {
</ins><span class="cx"> var checked = $('#display-header-text').prop('checked'),
</span><span class="cx"> text_color;
</span><span class="cx"> header_text_fields.toggle( checked );
</span><span class="lines">@@ -389,10 +400,10 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.6.0
</span><span class="cx"> */
</span><del>- function js_2() { ?>
</del><ins>+ public function js_2() { ?>
</ins><span class="cx"> <script type="text/javascript">
</span><span class="cx"> /* <![CDATA[ */
</span><del>- function onEndCrop( coords ) {
</del><ins>+ public function onEndCrop( coords ) {
</ins><span class="cx"> jQuery( '#x1' ).val(coords.x);
</span><span class="cx"> jQuery( '#y1' ).val(coords.y);
</span><span class="cx"> jQuery( '#width' ).val(coords.w);
</span><span class="lines">@@ -441,7 +452,7 @@
</span><span class="cx"> <?php
</span><span class="cx"> }
</span><span class="cx"> ?>
</span><del>- onInit: function () {
</del><ins>+ onInit: public function () {
</ins><span class="cx"> jQuery('#width').val(xinit);
</span><span class="cx"> jQuery('#height').val(yinit);
</span><span class="cx"> },
</span><span class="lines">@@ -463,7 +474,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> */
</span><del>- function step_1() {
</del><ins>+ public function step_1() {
</ins><span class="cx"> $this->process_default_headers();
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -681,7 +692,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> */
</span><del>- function step_2() {
</del><ins>+ public function step_2() {
</ins><span class="cx"> check_admin_referer('custom-header-upload', '_wpnonce-custom-header-upload');
</span><span class="cx"> if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
</span><span class="cx"> wp_die( __( 'Cheatin’ uh?' ) );
</span><span class="lines">@@ -795,7 +806,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.4.0
</span><span class="cx"> */
</span><del>- function step_2_manage_upload() {
</del><ins>+ public function step_2_manage_upload() {
</ins><span class="cx"> $overrides = array('test_form' => false);
</span><span class="cx">
</span><span class="cx"> $uploaded_file = $_FILES['import'];
</span><span class="lines">@@ -832,7 +843,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> */
</span><del>- function step_3() {
</del><ins>+ public function step_3() {
</ins><span class="cx"> check_admin_referer( 'custom-header-crop-image' );
</span><span class="cx">
</span><span class="cx"> if ( ! current_theme_supports( 'custom-header', 'uploads' ) )
</span><span class="lines">@@ -908,7 +919,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> */
</span><del>- function finished() {
</del><ins>+ public function finished() {
</ins><span class="cx"> $this->updated = true;
</span><span class="cx"> $this->step_1();
</span><span class="cx"> }
</span><span class="lines">@@ -918,7 +929,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 2.1.0
</span><span class="cx"> */
</span><del>- function admin_page() {
</del><ins>+ public function admin_page() {
</ins><span class="cx"> if ( ! current_user_can('edit_theme_options') )
</span><span class="cx"> wp_die(__('You do not have permission to customize headers.'));
</span><span class="cx"> $step = $this->step();
</span><span class="lines">@@ -935,7 +946,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.4.0
</span><span class="cx"> */
</span><del>- function attachment_fields_to_edit( $form_fields ) {
</del><ins>+ public function attachment_fields_to_edit( $form_fields ) {
</ins><span class="cx"> return $form_fields;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -944,7 +955,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since 3.4.0
</span><span class="cx"> */
</span><del>- function filter_upload_tabs( $tabs ) {
</del><ins>+ public function filter_upload_tabs( $tabs ) {
</ins><span class="cx"> return $tabs;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1147,7 +1158,7 @@
</span><span class="cx"> * Gets attachment uploaded by Media Manager, crops it, then saves it as a
</span><span class="cx"> * new object. Returns JSON-encoded object details.
</span><span class="cx"> */
</span><del>- function ajax_header_crop() {
</del><ins>+ public function ajax_header_crop() {
</ins><span class="cx"> check_ajax_referer( 'image_editor-' . $_POST['id'], 'nonce' );
</span><span class="cx">
</span><span class="cx"> if ( ! current_user_can( 'edit_theme_options' ) ) {
</span><span class="lines">@@ -1204,7 +1215,7 @@
</span><span class="cx"> * Triggered when the user tries adds a new header image from the
</span><span class="cx"> * Media Manager, even if s/he doesn't save that change.
</span><span class="cx"> */
</span><del>- function ajax_header_add() {
</del><ins>+ public function ajax_header_add() {
</ins><span class="cx"> check_ajax_referer( 'header-add', 'nonce' );
</span><span class="cx">
</span><span class="cx"> if ( ! current_user_can( 'edit_theme_options' ) ) {
</span><span class="lines">@@ -1230,7 +1241,7 @@
</span><span class="cx"> * Triggered when the user clicks the overlay "X" button next to each image
</span><span class="cx"> * choice in the Customizer's Header tool.
</span><span class="cx"> */
</span><del>- function ajax_header_remove() {
</del><ins>+ public function ajax_header_remove() {
</ins><span class="cx"> check_ajax_referer( 'header-remove', 'nonce' );
</span><span class="cx">
</span><span class="cx"> if ( ! current_user_can( 'edit_theme_options' ) ) {
</span><span class="lines">@@ -1249,7 +1260,7 @@
</span><span class="cx"> wp_send_json_success();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function customize_set_last_used( $wp_customize ) {
</del><ins>+ public function customize_set_last_used( $wp_customize ) {
</ins><span class="cx"> $data = $wp_customize->get_setting( 'header_image_data' )->post_value();
</span><span class="cx">
</span><span class="cx"> if ( ! isset( $data['attachment_id'] ) ) {
</span></span></pre>
</div>
</div>
</body>
</html>