<!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>[20912] trunk/wp-includes: Theme Customizer: Section reorganization.</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/20912">20912</a></dd>
<dt>Author</dt> <dd>koopersmith</dd>
<dt>Date</dt> <dd>2012-05-25 19:52:54 +0000 (Fri, 25 May 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Theme Customizer: Section reorganization. see <a href="http://core.trac.wordpress.org/ticket/19910">#19910</a>.

Now that sections are organized in accordions, group items by size and usage.
Move header/background controls into colors, header image, background image, and title/tagline sections.</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>
</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 (20911 => 20912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-customize-control.php        2012-05-25 18:58:23 UTC (rev 20911)
+++ trunk/wp-includes/class-wp-customize-control.php        2012-05-25 19:52:54 UTC (rev 20912)
</span><span class="lines">@@ -404,7 +404,7 @@
</span><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><del>-                        'section'  =&gt; 'header',
</del><ins>+                        'section'  =&gt; 'header_image',
</ins><span class="cx">                         'context'  =&gt; 'custom-header',
</span><span class="cx">                         'removed'  =&gt; 'remove-header',
</span><span class="cx">                         'get_url'  =&gt; 'get_header_image',
</span></span></pre></div>
<a id="trunkwpincludesclasswpcustomizemanagerphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-customize-manager.php (20911 => 20912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-customize-manager.php        2012-05-25 18:58:23 UTC (rev 20911)
+++ trunk/wp-includes/class-wp-customize-manager.php        2012-05-25 19:52:54 UTC (rev 20912)
</span><span class="lines">@@ -600,34 +600,84 @@
</span><span class="cx">          */
</span><span class="cx">         public function register_controls() {
</span><span class="cx"> 
</span><del>-                /* Custom Header */
</del><ins>+                /* Site Title &amp; Tagline */
</ins><span class="cx"> 
</span><del>-                $this-&gt;add_section( 'header', array(
-                        'title'          =&gt; __( 'Header' ),
-                        'theme_supports' =&gt; 'custom-header',
-                        'priority'       =&gt; 20,
</del><ins>+                $this-&gt;add_section( 'title_tagline', array(
+                        'title'    =&gt; __( 'Site Title &amp; Tagline' ),
+                        'priority' =&gt; 20,
</ins><span class="cx">                 ) );
</span><span class="cx"> 
</span><ins>+                $this-&gt;add_setting( 'blogname', array(
+                        'default'    =&gt; get_option( 'blogname' ),
+                        'type'       =&gt; 'option',
+                        'capability' =&gt; 'manage_options',
+                ) );
+
+                $this-&gt;add_control( 'blogname', array(
+                        'label'      =&gt; __( 'Site Title' ),
+                        'section'    =&gt; 'title_tagline',
+                ) );
+
+                $this-&gt;add_setting( 'blogdescription', array(
+                        'default'    =&gt; get_option( 'blogdescription' ),
+                        'type'       =&gt; 'option',
+                        'capability' =&gt; 'manage_options',
+                ) );
+
+                $this-&gt;add_control( 'blogdescription', array(
+                        'label'      =&gt; __( 'Tagline' ),
+                        'section'    =&gt; 'title_tagline',
+                ) );
+
+                /* Colors */
+
+                $this-&gt;add_section( 'colors', array(
+                        'title'          =&gt; __( 'Colors' ),
+                        'priority'       =&gt; 40,
+                ) );
+
</ins><span class="cx">                 $this-&gt;add_setting( 'header_textcolor', array(
</span><span class="cx">                         'sanitize_callback' =&gt; 'sanitize_header_textcolor',
</span><span class="cx">                         'theme_supports' =&gt; array( 'custom-header', 'header-text' ),
</span><span class="cx">                         'default'        =&gt; get_theme_support( 'custom-header', 'default-text-color' ),
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><ins>+                // Input type: checkbox
+                // With custom value
</ins><span class="cx">                 $this-&gt;add_control( 'display_header_text', array(
</span><span class="cx">                         'settings' =&gt; 'header_textcolor',
</span><span class="cx">                         'label'    =&gt; __( 'Display Header Text' ),
</span><del>-                        'section'  =&gt; 'header',
</del><ins>+                        'section'  =&gt; 'title_tagline',
</ins><span class="cx">                         'type'     =&gt; 'checkbox',
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;add_control( new WP_Customize_Color_Control( $this, 'header_textcolor', array(
</span><span class="cx">                         'label'   =&gt; __( 'Text Color' ),
</span><del>-                        'section' =&gt; 'header',
</del><ins>+                        'section' =&gt; 'colors',
</ins><span class="cx">                 ) ) );
</span><span class="cx"> 
</span><del>-                // Input type: checkbox
-                // With custom value
</del><ins>+                // Input type: Color
+                // With sanitize_callback
+                $this-&gt;add_setting( 'background_color', array(
+                        'default'           =&gt; get_theme_support( 'custom-background', 'default-color' ),
+                        'sanitize_callback' =&gt; 'sanitize_hexcolor',
+                        'theme_supports'    =&gt; 'custom-background',
+                ) );
+
+                $this-&gt;add_control( new WP_Customize_Color_Control( $this, 'background_color', array(
+                        'label'   =&gt; __( 'Background Color' ),
+                        'section' =&gt; 'colors',
+                ) ) );
+
+
+                /* Custom Header */
+
+                $this-&gt;add_section( 'header_image', array(
+                        'title'          =&gt; __( 'Header Image' ),
+                        'theme_supports' =&gt; 'custom-header',
+                        'priority'       =&gt; 60,
+                ) );
+
</ins><span class="cx">                 $this-&gt;add_setting( 'header_image', array(
</span><span class="cx">                         'default'        =&gt; get_theme_support( 'custom-header', 'default-image' ),
</span><span class="cx">                         'theme_supports' =&gt; 'custom-header',
</span><span class="lines">@@ -637,25 +687,12 @@
</span><span class="cx"> 
</span><span class="cx">                 /* Custom Background */
</span><span class="cx"> 
</span><del>-                $this-&gt;add_section( 'background', array(
-                        'title'          =&gt; __( 'Background' ),
</del><ins>+                $this-&gt;add_section( 'background_image', array(
+                        'title'          =&gt; __( 'Background Image' ),
</ins><span class="cx">                         'theme_supports' =&gt; 'custom-background',
</span><del>-                        'priority'       =&gt; 30,
</del><ins>+                        'priority'       =&gt; 80,
</ins><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                // Input type: Color
-                // With sanitize_callback
-                $this-&gt;add_setting( 'background_color', array(
-                        'default'           =&gt; get_theme_support( 'custom-background', 'default-color' ),
-                        'sanitize_callback' =&gt; 'sanitize_hexcolor',
-                        'theme_supports'    =&gt; 'custom-background',
-                ) );
-
-                $this-&gt;add_control( new WP_Customize_Color_Control( $this, 'background_color', array(
-                        'label'   =&gt; __( 'Background Color' ),
-                        'section' =&gt; 'background',
-                ) ) );
-
</del><span class="cx">                 $this-&gt;add_setting( 'background_image', array(
</span><span class="cx">                         'default'        =&gt; get_theme_support( 'custom-background', 'default-image' ),
</span><span class="cx">                         'theme_supports' =&gt; 'custom-background',
</span><span class="lines">@@ -663,7 +700,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;add_control( new WP_Customize_Image_Control( $this, 'background_image', array(
</span><span class="cx">                         'label'          =&gt; __( 'Background Image' ),
</span><del>-                        'section'        =&gt; 'background',
</del><ins>+                        'section'        =&gt; 'background_image',
</ins><span class="cx">                         'context'        =&gt; 'custom-background',
</span><span class="cx">                 ) ) );
</span><span class="cx"> 
</span><span class="lines">@@ -674,7 +711,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;add_control( 'background_repeat', array(
</span><span class="cx">                         'label'      =&gt; __( 'Background Repeat' ),
</span><del>-                        'section'    =&gt; 'background',
</del><ins>+                        'section'    =&gt; 'background_image',
</ins><span class="cx">                         'type'       =&gt; 'radio',
</span><span class="cx">                         'choices'    =&gt; array(
</span><span class="cx">                                 'no-repeat'  =&gt; __('No Repeat'),
</span><span class="lines">@@ -691,7 +728,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;add_control( 'background_position_x', array(
</span><span class="cx">                         'label'      =&gt; __( 'Background Position' ),
</span><del>-                        'section'    =&gt; 'background',
</del><ins>+                        'section'    =&gt; 'background_image',
</ins><span class="cx">                         'type'       =&gt; 'radio',
</span><span class="cx">                         'choices'    =&gt; array(
</span><span class="cx">                                 'left'       =&gt; __('Left'),
</span><span class="lines">@@ -707,7 +744,7 @@
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;add_control( 'background_attachment', array(
</span><span class="cx">                         'label'      =&gt; __( 'Background Attachment' ),
</span><del>-                        'section'    =&gt; 'background',
</del><ins>+                        'section'    =&gt; 'background_image',
</ins><span class="cx">                         'type'       =&gt; 'radio',
</span><span class="cx">                         'choices'    =&gt; array(
</span><span class="cx">                                 'fixed'      =&gt; __('Fixed'),
</span><span class="lines">@@ -733,7 +770,7 @@
</span><span class="cx">                 $this-&gt;add_section( 'nav', array(
</span><span class="cx">                         'title'          =&gt; __( 'Navigation' ),
</span><span class="cx">                         'theme_supports' =&gt; 'menus',
</span><del>-                        'priority'       =&gt; 40,
</del><ins>+                        'priority'       =&gt; 100,
</ins><span class="cx">                         'description'    =&gt; sprintf( _n('Your theme supports %s menu. Select which menu you would like to use.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . &quot;\n\n&quot; . __('You can edit your menu content on the Menus screen in the Appearance section.'),
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><span class="lines">@@ -768,7 +805,7 @@
</span><span class="cx">                 $this-&gt;add_section( 'static_front_page', array(
</span><span class="cx">                         'title'          =&gt; __( 'Static Front Page' ),
</span><span class="cx">                 //        'theme_supports' =&gt; 'static-front-page',
</span><del>-                        'priority'       =&gt; 50,
</del><ins>+                        'priority'       =&gt; 120,
</ins><span class="cx">                         'description'    =&gt; __( 'Your theme supports a static front page.' ),
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><span class="lines">@@ -812,35 +849,6 @@
</span><span class="cx">                         'section'    =&gt; 'static_front_page',
</span><span class="cx">                         'type'       =&gt; 'dropdown-pages',
</span><span class="cx">                 ) );
</span><del>-
-                /* Site Title &amp; Tagline */
-
-                $this-&gt;add_section( 'strings', array(
-                        'title'    =&gt; __( 'Site Title &amp; Tagline' ),
-                        'priority' =&gt; 5,
-                ) );
-
-                $this-&gt;add_setting( 'blogname', array(
-                        'default'    =&gt; get_option( 'blogname' ),
-                        'type'       =&gt; 'option',
-                        'capability' =&gt; 'manage_options',
-                ) );
-
-                $this-&gt;add_control( 'blogname', array(
-                        'label'      =&gt; __( 'Site Title' ),
-                        'section'    =&gt; 'strings',
-                ) );
-
-                $this-&gt;add_setting( 'blogdescription', array(
-                        'default'    =&gt; get_option( 'blogdescription' ),
-                        'type'       =&gt; 'option',
-                        'capability' =&gt; 'manage_options',
-                ) );
-
-                $this-&gt;add_control( 'blogdescription', array(
-                        'label'      =&gt; __( 'Tagline' ),
-                        'section'    =&gt; 'strings',
-                ) );
</del><span class="cx">         }
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>