<!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>[21354] trunk/wp-includes: phpdoc for Customizer classes and methods.</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, #logmsg > ol { margin-left: 0; 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/21354">21354</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2012-07-26 21:45:33 +0000 (Thu, 26 Jul 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>phpdoc for Customizer classes and methods. Props bananastalktome. see <a href="http://core.trac.wordpress.org/ticket/21303">#21303</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesclasswpcustomizecontrolphp">trunk/wp-includes/class-wp-customize-control.php</a></li>
<li><a href="#trunkwpincludesclasswpcustomizemanagerphp">trunk/wp-includes/class-wp-customize-manager.php</a></li>
<li><a href="#trunkwpincludesclasswpcustomizesectionphp">trunk/wp-includes/class-wp-customize-section.php</a></li>
<li><a href="#trunkwpincludesclasswpcustomizesettingphp">trunk/wp-includes/class-wp-customize-setting.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesclasswpcustomizecontrolphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-customize-control.php (21353 => 21354)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-customize-control.php        2012-07-26 21:33:01 UTC (rev 21353)
+++ trunk/wp-includes/class-wp-customize-control.php        2012-07-26 21:45:33 UTC (rev 21354)
</span><span class="lines">@@ -6,25 +6,71 @@
</span><span class="cx">  * @subpackage Customize
</span><span class="cx">  * @since 3.4.0
</span><span class="cx">  */
</span><del>-
</del><span class="cx"> class WP_Customize_Control {
</span><ins>+        /**
+         * @access public
+         * @var WP_Customize_Manager
+         */
</ins><span class="cx">         public $manager;
</span><ins>+        
+        /**
+         * @access public
+         * @var string
+         */
</ins><span class="cx">         public $id;
</span><span class="cx"> 
</span><del>-        // All settings tied to the control.
</del><ins>+        /**
+         * All settings tied to the control.
+         *
+         * @access public
+         * @var array
+         */
</ins><span class="cx">         public $settings;
</span><span class="cx"> 
</span><del>-        // The primary setting for the control (if there is one).
</del><ins>+        /**
+         * The primary setting for the control (if there is one).
+         *
+         * @access public
+         * @var string
+         */
</ins><span class="cx">         public $setting = 'default';
</span><span class="cx"> 
</span><ins>+        /**
+         * @access public
+         * @var int
+         */
</ins><span class="cx">         public $priority          = 10;
</span><ins>+        
+        /**
+         * @access public
+         * @var string
+         */
</ins><span class="cx">         public $section           = '';
</span><ins>+        
+        /**
+         * @access public
+         * @var string
+         */
</ins><span class="cx">         public $label             = '';
</span><del>-        // @todo: remove choices
</del><ins>+        
+        /**
+         * @todo: Remove choices
+         *
+         * @access public
+         * @var array
+         */
</ins><span class="cx">         public $choices           = array();
</span><span class="cx"> 
</span><ins>+        /**
+         * @access public
+         * @var array
+         */
</ins><span class="cx">         public $json = array();
</span><span class="cx"> 
</span><ins>+        /**
+         * @access public
+         * @var string
+         */
</ins><span class="cx">         public $type = 'text';
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -34,6 +80,10 @@
</span><span class="cx">          * If $args['settings'] is not defined, use the $id as the setting ID.
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><ins>+         *
+         * @param WP_Customize_Manager $manager
+         * @param string $id
+         * @param array $args
</ins><span class="cx">          */
</span><span class="cx">         function __construct( $manager, $id, $args = array() ) {
</span><span class="cx">                 $keys = array_keys( get_object_vars( $this ) );
</span><span class="lines">@@ -75,6 +125,9 @@
</span><span class="cx">          * Grabs the main setting by default.
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><ins>+         *
+         * @param string $setting_key
+         * @return mixed The requested setting's value, if the setting exists.
</ins><span class="cx">          */
</span><span class="cx">         public final function value( $setting_key = 'default' ) {
</span><span class="cx">                 if ( isset( $this-&gt;settings[ $setting_key ] ) )
</span><span class="lines">@@ -119,6 +172,7 @@
</span><span class="cx">          * Check capabilities and render the control.
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><ins>+         * @uses WP_Customize_Control::render()
</ins><span class="cx">          */
</span><span class="cx">         public final function maybe_render() {
</span><span class="cx">                 if ( ! $this-&gt;check_capabilities() )
</span><span class="lines">@@ -143,14 +197,30 @@
</span><span class="cx">                         &lt;?php $this-&gt;render_content(); ?&gt;
</span><span class="cx">                 &lt;/li&gt;&lt;?php
</span><span class="cx">         }
</span><del>-
</del><ins>+        
+        /**
+         * Get the data link parameter for a setting.
+         *
+         * @since 3.4.0
+         *
+         * @param string $setting_key
+         * @return string Data link parameter, if $setting_key is a valid setting, empty string otherwise.
+         */
</ins><span class="cx">         public function get_link( $setting_key = 'default' ) {
</span><span class="cx">                 if ( ! isset( $this-&gt;settings[ $setting_key ] ) )
</span><span class="cx">                         return '';
</span><span class="cx"> 
</span><span class="cx">                 return 'data-customize-setting-link=&quot;' . esc_attr( $this-&gt;settings[ $setting_key ]-&gt;id ) . '&quot;';
</span><span class="cx">         }
</span><del>-
</del><ins>+        
+        /**
+         * Render the data link parameter for a setting
+         *
+         * @since 3.4.0
+         * @uses WP_Customize_Control::get_link()
+         *
+         * @param string $setting_key
+         */
</ins><span class="cx">         public function link( $setting_key = 'default' ) {
</span><span class="cx">                 echo $this-&gt;get_link( $setting_key );
</span><span class="cx">         }
</span><span class="lines">@@ -238,25 +308,69 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Customize Color Control Class
+ *
+ * @package WordPress
+ * @subpackage Customize
+ * @since 3.4.0
+ */
</ins><span class="cx"> class WP_Customize_Color_Control extends WP_Customize_Control {
</span><ins>+        /**
+         * @access public
+         * @var string
+         */
</ins><span class="cx">         public $type = 'color';
</span><ins>+        
+        /**
+         * @access public
+         * @var array
+         */
</ins><span class="cx">         public $statuses;
</span><span class="cx"> 
</span><ins>+        /**
+         * Constructor.
+         *
+         * If $args['settings'] is not defined, use the $id as the setting ID.
+         *
+         * @since 3.4.0
+         * @uses WP_Customize_Control::__construct()
+         *
+         * @param WP_Customize_Manager $manager
+         * @param string $id
+         * @param array $args
+         */
</ins><span class="cx">         public function __construct( $manager, $id, $args = array() ) {
</span><span class="cx">                 $this-&gt;statuses = array( '' =&gt; __('Default') );
</span><span class="cx">                 parent::__construct( $manager, $id, $args );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * Enqueue control related scripts/styles.
+         *
+         * @since 3.4.0
+         */
</ins><span class="cx">         public function enqueue() {
</span><span class="cx">                 wp_enqueue_script( 'farbtastic' );
</span><span class="cx">                 wp_enqueue_style( 'farbtastic' );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * Refresh the parameters passed to the JavaScript via JSON.
+         *
+         * @since 3.4.0
+         * @uses WP_Customize_Control::to_json()
+         */
</ins><span class="cx">         public function to_json() {
</span><span class="cx">                 parent::to_json();
</span><span class="cx">                 $this-&gt;json['statuses'] = $this-&gt;statuses;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * Render the control's content.
+         *
+         * @since 3.4.0
+         */
</ins><span class="cx">         public function render_content() {
</span><span class="cx">                 ?&gt;
</span><span class="cx">                 &lt;label&gt;
</span><span class="lines">@@ -276,15 +390,33 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Customize Upload Control Class
+ *
+ * @package WordPress
+ * @subpackage Customize
+ * @since 3.4.0
+ */
</ins><span class="cx"> class WP_Customize_Upload_Control extends WP_Customize_Control {
</span><span class="cx">         public $type    = 'upload';
</span><span class="cx">         public $removed = '';
</span><span class="cx">         public $context;
</span><span class="cx"> 
</span><ins>+        /**
+         * Enqueue control related scripts/styles.
+         *
+         * @since 3.4.0
+         */
</ins><span class="cx">         public function enqueue() {
</span><span class="cx">                 wp_enqueue_script( 'wp-plupload' );
</span><span class="cx">         }
</span><del>-
</del><ins>+        
+        /**
+         * Refresh the parameters passed to the JavaScript via JSON.
+         *
+         * @since 3.4.0
+         * @uses WP_Customize_Control::to_json()
+         */
</ins><span class="cx">         public function to_json() {
</span><span class="cx">                 parent::to_json();
</span><span class="cx"> 
</span><span class="lines">@@ -294,6 +426,11 @@
</span><span class="cx">                         $this-&gt;json['context'] = $this-&gt;context;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * Render the control's content.
+         *
+         * @since 3.4.0
+         */
</ins><span class="cx">         public function render_content() {
</span><span class="cx">                 ?&gt;
</span><span class="cx">                 &lt;label&gt;
</span><span class="lines">@@ -307,6 +444,13 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Customize Image Control Class
+ *
+ * @package WordPress
+ * @subpackage Customize
+ * @since 3.4.0
+ */
</ins><span class="cx"> class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
</span><span class="cx">         public $type = 'image';
</span><span class="cx">         public $get_url;
</span><span class="lines">@@ -314,6 +458,18 @@
</span><span class="cx"> 
</span><span class="cx">         protected $tabs = array();
</span><span class="cx"> 
</span><ins>+        /**
+         * Constructor.
+         *
+         * If $args['settings'] is not defined, use the $id as the setting ID.
+         *
+         * @since 3.4.0
+         * @uses WP_Customize_Upload_Control::__construct()
+         *
+         * @param WP_Customize_Manager $manager
+         * @param string $id
+         * @param array $args
+         */
</ins><span class="cx">         public function __construct( $manager, $id, $args ) {
</span><span class="cx">                 $this-&gt;statuses = array( '' =&gt; __('No Image') );
</span><span class="cx"> 
</span><span class="lines">@@ -323,11 +479,22 @@
</span><span class="cx">                 $this-&gt;add_tab( 'uploaded',   __('Uploaded'),   array( $this, 'tab_uploaded' ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * Refresh the parameters passed to the JavaScript via JSON.
+         *
+         * @since 3.4.0
+         * @uses WP_Customize_Upload_Control::to_json()
+         */
</ins><span class="cx">         public function to_json() {
</span><span class="cx">                 parent::to_json();
</span><span class="cx">                 $this-&gt;json['statuses'] = $this-&gt;statuses;
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * Render the control's content.
+         *
+         * @since 3.4.0
+         */
</ins><span class="cx">         public function render_content() {
</span><span class="cx">                 $src = $this-&gt;value();
</span><span class="cx">                 if ( isset( $this-&gt;get_url ) )
</span><span class="lines">@@ -372,7 +539,16 @@
</span><span class="cx">                 &lt;/div&gt;
</span><span class="cx">                 &lt;?php
</span><span class="cx">         }
</span><del>-
</del><ins>+        
+        /**
+         * Add a tab to the control.
+         *
+         * @since 3.4.0
+         *
+         * @param string $id
+         * @param string $label
+         * @param mixed $callback
+         */
</ins><span class="cx">         public function add_tab( $id, $label, $callback ) {
</span><span class="cx">                 $this-&gt;tabs[ $id ] = array(
</span><span class="cx">                         'label'    =&gt; $label,
</span><span class="lines">@@ -380,10 +556,20 @@
</span><span class="cx">                 );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * Remove a tab from the control.
+         *
+         * @since 3.4.0
+         *
+         * @param string $id
+         */
</ins><span class="cx">         public function remove_tab( $id ) {
</span><span class="cx">                 unset( $this-&gt;tabs[ $id ] );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * @since 3.4.0
+         */
</ins><span class="cx">         public function tab_upload_new() {
</span><span class="cx">                 if ( ! _device_can_upload() ) {
</span><span class="cx">                         ?&gt;
</span><span class="lines">@@ -400,13 +586,22 @@
</span><span class="cx">                         &lt;?php
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-
</del><ins>+        
+        /**
+         * @since 3.4.0
+         */
</ins><span class="cx">         public function tab_uploaded() {
</span><span class="cx">                 ?&gt;
</span><span class="cx">                 &lt;div class=&quot;uploaded-target&quot;&gt;&lt;/div&gt;
</span><span class="cx">                 &lt;?php
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * @since 3.4.0
+         *
+         * @param string $url
+         * @param string $thumbnail_url
+         */
</ins><span class="cx">         public function print_tab_image( $url, $thumbnail_url = null ) {
</span><span class="cx">                 $url = set_url_scheme( $url );
</span><span class="cx">                 $thumbnail_url = ( $thumbnail_url ) ? set_url_scheme( $thumbnail_url ) : $url;
</span><span class="lines">@@ -418,7 +613,23 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Customize Background Image Control Class
+ *
+ * @package WordPress
+ * @subpackage Customize
+ * @since 3.4.0
+ */
</ins><span class="cx"> class WP_Customize_Background_Image_Control extends WP_Customize_Image_Control {
</span><ins>+
+        /**
+         * Constructor.
+         *
+         * @since 3.4.0
+         * @uses WP_Customize_Image_Control::__construct()
+         *
+         * @param WP_Customize_Manager $manager
+         */
</ins><span class="cx">         public function __construct( $manager ) {
</span><span class="cx">                 parent::__construct( $manager, 'background_image', array(
</span><span class="cx">                         'label'    =&gt; __( 'Background Image' ),
</span><span class="lines">@@ -431,6 +642,9 @@
</span><span class="cx">                         $this-&gt;add_tab( 'default',  __('Default'),  array( $this, 'tab_default_background' ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * @since 3.4.0
+         */
</ins><span class="cx">         public function tab_uploaded() {
</span><span class="cx">                 $backgrounds = get_posts( array(
</span><span class="cx">                         'post_type'  =&gt; 'attachment',
</span><span class="lines">@@ -448,13 +662,34 @@
</span><span class="cx">                 foreach ( (array) $backgrounds as $background )
</span><span class="cx">                         $this-&gt;print_tab_image( esc_url_raw( $background-&gt;guid ) );
</span><span class="cx">         }
</span><del>-
</del><ins>+        
+        /**
+         * @since 3.4.0
+         * @uses WP_Customize_Image_Control::print_tab_image()
+         */
</ins><span class="cx">         public function tab_default_background() {
</span><span class="cx">                 $this-&gt;print_tab_image( $this-&gt;setting-&gt;default );
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Customize Header Image Control Class
+ *
+ * @package WordPress
+ * @subpackage Customize
+ * @since 3.4.0
+ */
</ins><span class="cx"> class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
</span><ins>+
+        /**
+         * Constructor.
+         *
+         * @since 3.4.0
+         * @uses WP_Customize_Image_Control::__construct()
+         * @uses WP_Customize_Image_Control::add_tab()
+         *
+         * @param WP_Customize_Manager $manager
+         */
</ins><span class="cx">         public function __construct( $manager ) {
</span><span class="cx">                 parent::__construct( $manager, 'header_image', array(
</span><span class="cx">                         'label'    =&gt; __( 'Header Image' ),
</span><span class="lines">@@ -477,6 +712,12 @@
</span><span class="cx">                 $this-&gt;add_tab( 'default',  __('Default'),  array( $this, 'tab_default_headers' ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * @since 3.4.0
+         *
+         * @param mixed $choice Which header image to select. (@see Custom_Image_Header::get_header_image() )
+         * @param array $header
+         */
</ins><span class="cx">         public function print_header_image( $choice, $header ) {
</span><span class="cx">                 $header['url']           = set_url_scheme( $header['url'] );
</span><span class="cx">                 $header['thumbnail_url'] = set_url_scheme( $header['thumbnail_url'] );
</span><span class="lines">@@ -496,7 +737,10 @@
</span><span class="cx">                 &lt;/a&gt;
</span><span class="cx">                 &lt;?php
</span><span class="cx">         }
</span><del>-
</del><ins>+        
+        /**
+         * @since 3.4.0
+         */
</ins><span class="cx">         public function tab_uploaded() {
</span><span class="cx">                 $headers = get_uploaded_header_images();
</span><span class="cx"> 
</span><span class="lines">@@ -506,6 +750,9 @@
</span><span class="cx">                         $this-&gt;print_header_image( $choice, $header );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        /**
+         * @since 3.4.0
+         */
</ins><span class="cx">         public function tab_default_headers() {
</span><span class="cx">                 global $custom_image_header;
</span><span class="cx">                 $custom_image_header-&gt;process_default_headers();
</span></span></pre></div>
<a id="trunkwpincludesclasswpcustomizemanagerphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-customize-manager.php (21353 => 21354)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-customize-manager.php        2012-07-26 21:33:01 UTC (rev 21353)
+++ trunk/wp-includes/class-wp-customize-manager.php        2012-07-26 21:45:33 UTC (rev 21354)
</span><span class="lines">@@ -1,12 +1,11 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> /**
</span><del>- * Customize
</del><ins>+ * Customize Manager.
</ins><span class="cx">  *
</span><span class="cx">  * @package WordPress
</span><span class="cx">  * @subpackage Customize
</span><span class="cx">  * @since 3.4.0
</span><span class="cx">  */
</span><del>-
</del><span class="cx"> final class WP_Customize_Manager {
</span><span class="cx">         protected $theme;
</span><span class="cx">         protected $original_stylesheet;
</span><span class="lines">@@ -56,10 +55,12 @@
</span><span class="cx">                 add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ) );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-         /**
</del><ins>+        /**
</ins><span class="cx">          * Return true if it's an AJAX request.
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><ins>+         *
+         * @return bool
</ins><span class="cx">          */
</span><span class="cx">         public function doing_ajax() {
</span><span class="cx">                 return isset( $_POST['customized'] ) || ( defined( 'DOING_AJAX' ) &amp;&amp; DOING_AJAX );
</span><span class="lines">@@ -69,10 +70,10 @@
</span><span class="cx">          * Custom wp_die wrapper. Returns either the standard message for UI
</span><span class="cx">          * or the AJAX message.
</span><span class="cx">          *
</span><del>-         * @param  mixed $ajax_message AJAX return
-         * @param  mixed $message      UI message
</del><ins>+         * @since 3.4.0
</ins><span class="cx">          *
</span><del>-         * @since 3.4.0
</del><ins>+         * @param mixed $ajax_message AJAX return
+         * @param mixed $message UI message 
</ins><span class="cx">          */
</span><span class="cx">         protected function wp_die( $ajax_message, $message = null ) {
</span><span class="cx">                 if ( $this-&gt;doing_ajax() )
</span><span class="lines">@@ -88,6 +89,8 @@
</span><span class="cx">          * Return the AJAX wp_die() handler if it's a customized request.
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><ins>+         *
+         * @return string
</ins><span class="cx">          */
</span><span class="cx">         public function wp_die_handler() {
</span><span class="cx">                 if ( $this-&gt;doing_ajax() )
</span><span class="lines">@@ -95,11 +98,12 @@
</span><span class="cx"> 
</span><span class="cx">                 return '_default_wp_die_handler';
</span><span class="cx">         }
</span><ins>+        
</ins><span class="cx">         /**
</span><del>-        * Start preview and customize theme.
-        *
-        * Check if customize query variable exist. Init filters to filter the current theme.
</del><ins>+         * Start preview and customize theme.
</ins><span class="cx">          *
</span><ins>+         * Check if customize query variable exist. Init filters to filter the current theme.
+         *
</ins><span class="cx">          * @since 3.4.0
</span><span class="cx">          */
</span><span class="cx">         public function setup_theme() {
</span><span class="lines">@@ -136,7 +140,12 @@
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;start_previewing_theme();
</span><span class="cx">         }
</span><del>-
</del><ins>+        
+        /**
+         * Callback to validate a theme once it is loaded
+         *
+         * @since 3.4.0
+         */
</ins><span class="cx">         function after_setup_theme() {
</span><span class="cx">                 if ( ! $this-&gt;doing_ajax() &amp;&amp; ! validate_current_theme() ) {
</span><span class="cx">                         wp_redirect( 'themes.php?broken=true' );
</span><span class="lines">@@ -279,6 +288,9 @@
</span><span class="cx">          * Instead, the JS will sniff out the location header.
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><ins>+         *
+         * @param $status
+         * @return int
</ins><span class="cx">          */
</span><span class="cx">         public function wp_redirect_status( $status ) {
</span><span class="cx">                 if ( $this-&gt;is_preview() &amp;&amp; ! is_admin() )
</span><span class="lines">@@ -291,6 +303,9 @@
</span><span class="cx">          * Decode the $_POST attribute used to override the WP_Customize_Setting values.
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><ins>+         *
+         * @param mixed $setting A WP_Customize_Setting derived object
+         * @return string Sanitized attribute
</ins><span class="cx">          */
</span><span class="cx">         public function post_value( $setting ) {
</span><span class="cx">                 if ( ! isset( $this-&gt;_post_values ) ) {
</span><span class="lines">@@ -367,11 +382,11 @@
</span><span class="cx">                 );
</span><span class="cx"> 
</span><span class="cx">                 if ( 2 == $this-&gt;nonce_tick ) {
</span><del>-                         $settings['nonce'] = array(
-                                 'save' =&gt; wp_create_nonce( 'save-customize_' . $this-&gt;get_stylesheet() ),
-                                 'preview' =&gt; wp_create_nonce( 'preview-customize_' . $this-&gt;get_stylesheet() )
-                         );
-                 }
</del><ins>+                        $settings['nonce'] = array(
+                                'save' =&gt; wp_create_nonce( 'save-customize_' . $this-&gt;get_stylesheet() ),
+                                'preview' =&gt; wp_create_nonce( 'preview-customize_' . $this-&gt;get_stylesheet() )
+                        );
+                }
</ins><span class="cx"> 
</span><span class="cx">                 foreach ( $this-&gt;settings as $id =&gt; $setting ) {
</span><span class="cx">                         $settings['values'][ $id ] = $setting-&gt;js_value();
</span><span class="lines">@@ -464,6 +479,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><span class="cx">          *
</span><ins>+         * @param $current_theme {@internal Parameter is not used}
</ins><span class="cx">          * @return string Theme name.
</span><span class="cx">          */
</span><span class="cx">         public function current_theme( $current_theme ) {
</span><span class="lines">@@ -630,6 +646,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @param object $a Object A.
</span><span class="cx">          * @param object $b Object B.
</span><ins>+         * @return int
</ins><span class="cx">          */
</span><span class="cx">         protected final function _cmp_priority( $a, $b ) {
</span><span class="cx">                 $ap = $a-&gt;priority;
</span><span class="lines">@@ -960,6 +977,9 @@
</span><span class="cx">          * Accepts 'blank', and otherwise uses sanitize_hex_color_no_hash().
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><ins>+         *
+         * @param string $color
+         * @return string
</ins><span class="cx">          */
</span><span class="cx">         public function _sanitize_header_textcolor( $color ) {
</span><span class="cx">                 return ( 'blank' === $color ) ? 'blank' : sanitize_hex_color_no_hash( $color );
</span><span class="lines">@@ -973,6 +993,9 @@
</span><span class="cx">  * For validating values without a #, see sanitize_hex_color_no_hash().
</span><span class="cx">  *
</span><span class="cx">  * @since 3.4.0
</span><ins>+ *
+ * @param string $color
+ * @return string|null
</ins><span class="cx">  */
</span><span class="cx"> function sanitize_hex_color( $color ) {
</span><span class="cx">         if ( '' === $color )
</span><span class="lines">@@ -995,6 +1018,10 @@
</span><span class="cx">  * Returns either '', a 3 or 6 digit hex color (without a #), or null.
</span><span class="cx">  *
</span><span class="cx">  * @since 3.4.0
</span><ins>+ * @uses sanitize_hex_color()
+ *
+ * @param string $color
+ * @return string|null
</ins><span class="cx">  */
</span><span class="cx"> function sanitize_hex_color_no_hash( $color ) {
</span><span class="cx">         $color = ltrim( $color, '#' );
</span><span class="lines">@@ -1012,6 +1039,9 @@
</span><span class="cx">  * This method should only be necessary if using sanitize_hex_color_no_hash().
</span><span class="cx">  *
</span><span class="cx">  * @since 3.4.0
</span><ins>+ *
+ * @param string $color
+ * @return string
</ins><span class="cx">  */
</span><span class="cx"> function maybe_hash_hex_color( $color ) {
</span><span class="cx">         if ( $unhashed = sanitize_hex_color_no_hash( $color ) )
</span></span></pre></div>
<a id="trunkwpincludesclasswpcustomizesectionphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-customize-section.php (21353 => 21354)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-customize-section.php        2012-07-26 21:33:01 UTC (rev 21353)
+++ trunk/wp-includes/class-wp-customize-section.php        2012-07-26 21:45:33 UTC (rev 21354)
</span><span class="lines">@@ -1,12 +1,11 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> /**
</span><del>- * Customize Section Class
</del><ins>+ * Customize Section Class.
</ins><span class="cx">  *
</span><span class="cx">  * @package WordPress
</span><span class="cx">  * @subpackage Customize
</span><span class="cx">  * @since 3.4.0
</span><span class="cx">  */
</span><del>-
</del><span class="cx"> class WP_Customize_Section {
</span><span class="cx">         public $manager;
</span><span class="cx">         public $id;
</span><span class="lines">@@ -22,6 +21,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><span class="cx">          *
</span><ins>+         * @param WP_Customize_Manager $manager
</ins><span class="cx">          * @param string $id An specific ID of the section.
</span><span class="cx">          * @param array $args Section arguments.
</span><span class="cx">          */
</span><span class="lines">@@ -72,7 +72,6 @@
</span><span class="cx">                 $this-&gt;render();
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-
</del><span class="cx">         /**
</span><span class="cx">          * Render the section.
</span><span class="cx">          *
</span></span></pre></div>
<a id="trunkwpincludesclasswpcustomizesettingphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-customize-setting.php (21353 => 21354)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-customize-setting.php        2012-07-26 21:33:01 UTC (rev 21353)
+++ trunk/wp-includes/class-wp-customize-setting.php        2012-07-26 21:45:33 UTC (rev 21354)
</span><span class="lines">@@ -1,12 +1,11 @@
</span><span class="cx"> &lt;?php
</span><span class="cx"> /**
</span><del>- * Customize Setting Class
</del><ins>+ * Customize Setting Class.
</ins><span class="cx">  *
</span><span class="cx">  * @package WordPress
</span><span class="cx">  * @subpackage Customize
</span><span class="cx">  * @since 3.4.0
</span><span class="cx">  */
</span><del>-
</del><span class="cx"> class WP_Customize_Setting {
</span><span class="cx">         public $manager;
</span><span class="cx">         public $id;
</span><span class="lines">@@ -28,9 +27,11 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><span class="cx">          *
</span><ins>+         * @param WP_Customize_Manager $manager
</ins><span class="cx">          * @param string $id An specific ID of the setting. Can be a
</span><span class="cx">          *                   theme mod or option name.
</span><span class="cx">          * @param array $args Setting arguments.
</span><ins>+         * @return WP_Customize_Setting
</ins><span class="cx">          */
</span><span class="cx">         function __construct( $manager, $id, $args = array() ) {
</span><span class="cx">                 $keys = array_keys( get_class_vars( __CLASS__ ) );
</span><span class="lines">@@ -87,8 +88,9 @@
</span><span class="cx">          * Callback function to filter the theme mods and options.
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><ins>+         * @uses WP_Customize_Setting::multidimensional_replace()
</ins><span class="cx">          *
</span><del>-         * @param mixed Old value.
</del><ins>+         * @param mixed $original Old value.
</ins><span class="cx">          * @return mixed New or old value.
</span><span class="cx">          */
</span><span class="cx">         public function _preview_filter( $original ) {
</span><span class="lines">@@ -118,8 +120,8 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><span class="cx">          *
</span><del>-         * @param $default mixed A default value which is used as a fallback. Default is null.
-         * @return mixed Either the default value on failure or sanitized value.
</del><ins>+         * @param mixed $default A default value which is used as a fallback. Default is null.
+         * @return mixed The default value on failure, otherwise the sanitized value.
</ins><span class="cx">          */
</span><span class="cx">         public final function post_value( $default = null ) {
</span><span class="cx">                 if ( isset( $this-&gt;_post_value ) )
</span><span class="lines">@@ -138,7 +140,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><span class="cx">          *
</span><del>-         * @param $value mixed The value to sanitize.
</del><ins>+         * @param mixed $value The value to sanitize.
</ins><span class="cx">          * @return mixed Null if an input isn't valid, otherwise the sanitized value.
</span><span class="cx">          */
</span><span class="cx">         public function sanitize( $value ) {
</span><span class="lines">@@ -151,7 +153,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><span class="cx">          *
</span><del>-         * @param $value mixed The value to update.
</del><ins>+         * @param mixed $value The value to update.
</ins><span class="cx">          * @return mixed The result of saving the value.
</span><span class="cx">          */
</span><span class="cx">         protected function update( $value ) {
</span><span class="lines">@@ -172,7 +174,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><span class="cx">          *
</span><del>-         * @param $value mixed The value to update.
</del><ins>+         * @param mixed $value The value to update.
</ins><span class="cx">          * @return mixed The result of saving the value.
</span><span class="cx">          */
</span><span class="cx">         protected function _update_theme_mod( $value ) {
</span><span class="lines">@@ -192,7 +194,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.4.0
</span><span class="cx">          *
</span><del>-         * @param $value mixed The value to update.
</del><ins>+         * @param mixed $value The value to update.
</ins><span class="cx">          * @return mixed The result of saving the value.
</span><span class="cx">          */
</span><span class="cx">         protected function _update_option( $value ) {
</span><span class="lines">@@ -276,7 +278,7 @@
</span><span class="cx">          * @param $root
</span><span class="cx">          * @param $keys
</span><span class="cx">          * @param bool $create Default is false.
</span><del>-         * @return null|array
</del><ins>+         * @return null|array Keys are 'root', 'node', and 'key'.
</ins><span class="cx">          */
</span><span class="cx">         final protected function multidimensional( &amp;$root, $keys, $create = false ) {
</span><span class="cx">                 if ( $create &amp;&amp; empty( $root ) )
</span><span class="lines">@@ -372,8 +374,16 @@
</span><span class="cx">  * A setting that is used to filter a value, but will not save the results.
</span><span class="cx">  *
</span><span class="cx">  * Results should be properly handled using another setting or callback.
</span><ins>+ *
+ * @package WordPress
+ * @subpackage Customize
+ * @since 3.4.0
</ins><span class="cx">  */
</span><span class="cx"> class WP_Customize_Filter_Setting extends WP_Customize_Setting {
</span><ins>+        
+        /**
+         * @since 3.4.0
+         */
</ins><span class="cx">         public function update() {}
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -381,10 +391,19 @@
</span><span class="cx">  * A setting that is used to filter a value, but will not save the results.
</span><span class="cx">  *
</span><span class="cx">  * Results should be properly handled using another setting or callback.
</span><ins>+ *
+ * @package WordPress
+ * @subpackage Customize
+ * @since 3.4.0
</ins><span class="cx">  */
</span><span class="cx"> final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
</span><span class="cx">         public $id = 'header_image_data';
</span><span class="cx"> 
</span><ins>+        /**
+         * @since 3.4.0
+         *
+         * @param $value
+         */
</ins><span class="cx">         public function update( $value ) {
</span><span class="cx">                 global $custom_image_header;
</span><span class="cx"> 
</span><span class="lines">@@ -400,9 +419,20 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * @package WordPress
+ * @subpackage Customize
+ * @since 3.4.0
+ */
</ins><span class="cx"> final class WP_Customize_Background_Image_Setting extends WP_Customize_Setting {
</span><span class="cx">         public $id = 'background_image_thumb';
</span><span class="cx"> 
</span><ins>+        /**
+         * @since 3.4.0
+         * @uses remove_theme_mod()
+         *
+         * @param $value
+         */
</ins><span class="cx">         public function update( $value ) {
</span><span class="cx">                 remove_theme_mod( 'background_image_thumb' );
</span><span class="cx">         }
</span></span></pre>
</div>
</div>

</body>
</html>