<!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>[26567] trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php: Twenty Fourteen: remove Accent Color feature.</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/26567">26567</a></dd>
<dt>Author</dt> <dd>lancewillett</dd>
<dt>Date</dt> <dd>2013-12-03 18:04:56 +0000 (Tue, 03 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Twenty Fourteen: remove Accent Color feature. Props celloexpressions, fixes <a href="http://core.trac.wordpress.org/ticket/26220">#26220</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpcontentthemestwentyfourteeninccustomizerphp">trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpcontentthemestwentyfourteeninccustomizerphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php (26566 => 26567)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php    2013-12-03 17:43:52 UTC (rev 26566)
+++ trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php       2013-12-03 18:04:56 UTC (rev 26567)
</span><span class="lines">@@ -23,20 +23,6 @@
</span><span class="cx">  $wp_customize->get_section( 'colors' )->description           = __( 'Background may only be visible on wide screens.', 'twentyfourteen' );
</span><span class="cx">  $wp_customize->get_section( 'background_image' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' );
</span><span class="cx"> 
</span><del>-       // Add the custom accent color setting and control.
-       $wp_customize->add_setting( 'accent_color', array(
-               'default'           => '#24890d',
-               'sanitize_callback' => 'sanitize_hex_color',
-       ) );
-
-       $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'accent_color', array(
-               'label'    => __( 'Accent Color', 'twentyfourteen' ),
-               'section'  => 'colors',
-       ) ) );
-
-       add_filter( 'theme_mod_accent_mid',   'twentyfourteen_accent_mid'   );
-       add_filter( 'theme_mod_accent_light', 'twentyfourteen_accent_light' );
-
</del><span class="cx">   // Add the featured content section in case it's not already there.
</span><span class="cx">  $wp_customize->add_section( 'featured_content', array(
</span><span class="cx">          'title'       => __( 'Featured Content', 'twentyfourteen' ),
</span><span class="lines">@@ -72,261 +58,6 @@
</span><span class="cx"> add_action( 'customize_preview_init', 'twentyfourteen_customize_preview_js' );
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Tweak the brightness of a color by adjusting the RGB
- * values by the given interval.
- *
- * Use positive values of $steps to brighten the color and negative
- * values to darken the color. All three RGB values are modified by
- * the specified steps, within the range of 0-255. The hue is generally
- * maintained unless the number of steps causes one value to be capped
- * at 0 or 255.
- *
- * @since Twenty Fourteen 1.0
- *
- * @param string $color The original color, in 3- or 6-digit hexadecimal form.
- * @param int    $steps The number of steps to adjust the color by, in RGB units.
- * @return string $color The new color, in 6-digit hexadecimal form.
- */
-function twentyfourteen_adjust_color( $color, $steps ) {
-       // Convert shorthand to full hex.
-       if ( strlen( $color ) == 3 ) {
-               $color = str_repeat( substr( $color, 1, 1 ), 2 ) . str_repeat( substr( $color, 2, 1 ), 2 ) . str_repeat( substr( $color, 3, 1), 2 );
-       }
-
-       // Convert hex to rgb.
-       $rgb = array( hexdec( substr( $color, 1, 2 ) ), hexdec( substr( $color, 3, 2 ) ), hexdec( substr( $color, 5, 2 ) ) );
-
-       // Adjust color and switch back to 6-digit hex.
-       $hex = '#';
-       foreach ( $rgb as $value ) {
-               $value += $steps;
-               if ( $value > 255 ) {
-                       $value = 255;
-               } elseif ( $value < 0 ) {
-                       $value = 0;
-               }
-               $hex .= str_pad( dechex( $value ), 2, '0', STR_PAD_LEFT);
-       }
-
-       return $hex;
-}
-
- /**
- * Return a slightly lighter color than what is set as the theme's
- * accent color.
- *
- * @since Twenty Fourteen 1.0
- *
- * @return string Hex color.
- */
-function twentyfourteen_accent_mid() {
-       return twentyfourteen_adjust_color( get_theme_mod( 'accent_color' ), 29 );
-}
-
-/**
- * Return a lighter color than what is set as the theme's accent color.
- *
- * @since Twenty Fourteen 1.0
- *
- * @return string Hex color.
- */
-function twentyfourteen_accent_light() {
-       return twentyfourteen_adjust_color( get_theme_mod( 'accent_color' ), 49 );
-}
-
-/**
- * Cache the generated variants of the theme's accent color.
- *
- * @since Twenty Fourteen 1.0
- *
- * @return void
- */
-function twentyfourteen_rebuild_accent_colors() {
-       set_theme_mod( 'accent_mid',   twentyfourteen_accent_mid()   );
-       set_theme_mod( 'accent_light', twentyfourteen_accent_light() );
-}
-add_action( 'update_option_theme_mods_twentyfourteen', 'twentyfourteen_rebuild_accent_colors' );
-
-/**
- * Output the CSS for the Theme Customizer options.
- *
- * @since Twenty Fourteen 1.0
- *
- * @return void
- */
-function twentyfourteen_customizer_styles() {
-       $accent_color = get_theme_mod( 'accent_color', '#24890d' );
-
-       // Don't do anything if the current color is the default.
-       if ( '#24890d' === $accent_color ) {
-               return;
-       }
-
-       $accent_mid   = get_theme_mod( 'accent_mid'   );
-       $accent_light = get_theme_mod( 'accent_light' );
-
-       $css = '/* Custom accent color. */
-               a,
-               .content-sidebar .widget a {
-                       color: ' . $accent_color . ';
-               }
-
-               button,
-               .contributor-posts-link,
-               input[type="button"],
-               input[type="reset"],
-               input[type="submit"],
-               .search-toggle,
-               .hentry .mejs-controls .mejs-time-rail .mejs-time-current,
-               .widget button,
-               .widget input[type="button"],
-               .widget input[type="reset"],
-               .widget input[type="submit"],
-               .widget_calendar tbody a,
-               .content-sidebar .widget input[type="button"],
-               .content-sidebar .widget input[type="reset"],
-               .content-sidebar .widget input[type="submit"],
-               .slider-control-paging .slider-active:before,
-               .slider-control-paging .slider-active:hover:before,
-               .slider-direction-nav a:hover {
-                       background-color: ' . $accent_color . ';
-               }
-
-               ::-moz-selection {
-                       background: ' . $accent_color . ';
-               }
-
-               ::selection {
-                       background: ' . $accent_color . ';
-               }
-
-               .paging-navigation .page-numbers.current {
-                       border-color: ' .  $accent_color . ';
-               }
-
-               @media screen and (min-width: 782px) {
-                       .primary-navigation li:hover > a,
-                       .primary-navigation li.focus > a,
-                       .primary-navigation ul ul {
-                               background-color: ' . $accent_color . ';
-                       }
-               }
-
-               @media screen and (min-width: 1008px) {
-                       .secondary-navigation li:hover > a,
-                       .secondary-navigation li.focus > a,
-                       .secondary-navigation ul ul {
-                               background-color: ' . $accent_color . ';
-                       }
-               }
-
-               /* Generated "mid" variant of custom accent color. */
-               button:hover,
-               button:focus,
-               .contributor-posts-link:hover,
-               input[type="button"]:hover,
-               input[type="button"]:focus,
-               input[type="reset"]:hover,
-               input[type="reset"]:focus,
-               input[type="submit"]:hover,
-               input[type="submit"]:focus,
-               .search-toggle:hover,
-               .search-toggle.active,
-               .search-box,
-               .entry-meta .tag-links a:hover,
-               .widget input[type="button"]:hover,
-               .widget input[type="button"]:focus,
-               .widget input[type="reset"]:hover,
-               .widget input[type="reset"]:focus,
-               .widget input[type="submit"]:hover,
-               .widget input[type="submit"]:focus,
-               .widget_calendar tbody a:hover,
-               .content-sidebar .widget input[type="button"]:hover,
-               .content-sidebar .widget input[type="button"]:focus,
-               .content-sidebar .widget input[type="reset"]:hover,
-               .content-sidebar .widget input[type="reset"]:focus,
-               .content-sidebar .widget input[type="submit"]:hover,
-               .content-sidebar .widget input[type="submit"]:focus,
-               .slider-control-paging a:hover:before {
-                       background-color: ' . $accent_mid . ';
-               }
-
-               a:active,
-               a:hover,
-               .site-navigation a:hover,
-               .entry-title a:hover,
-               .entry-meta a:hover,
-               .cat-links a:hover,
-               .entry-content .edit-link a:hover,
-               .page-links a:hover,
-               .post-navigation a:hover,
-               .image-navigation a:hover,
-               .comment-author a:hover,
-               .comment-list .pingback a:hover,
-               .comment-list .trackback a:hover,
-               .comment-metadata a:hover,
-               .comment-reply-title small a:hover,
-               .widget a:hover,
-               .widget-title a:hover,
-               .widget_twentyfourteen_ephemera .entry-meta a:hover,
-               .content-sidebar .widget a:hover,
-               .content-sidebar .widget .widget-title a:hover,
-               .content-sidebar .widget_twentyfourteen_ephemera .entry-meta a:hover,
-               .site-info a:hover,
-               .featured-content a:hover {
-                       color: ' . $accent_mid . ';
-               }
-
-               .page-links a:hover,
-               .paging-navigation a:hover {
-                       border-color: ' . $accent_mid . ';
-               }
-
-               .entry-meta .tag-links a:hover:before {
-                       border-right-color: ' . $accent_mid . ';
-               }
-
-               @media screen and (min-width: 782px) {
-                       .primary-navigation ul ul a:hover,
-                       .primary-navigation ul ul li.focus > a {
-                               background-color: ' . $accent_mid . ';
-                       }
-               }
-
-               @media screen and (min-width: 1008px) {
-                       .secondary-navigation ul ul a:hover,
-                       .secondary-navigation ul ul li.focus > a {
-                               background-color: ' . $accent_mid . ';
-                       }
-               }
-
-               /* Generated "light" variant of custom accent color. */
-               button:active,
-               .contributor-posts-link:active,
-               input[type="button"]:active,
-               input[type="reset"]:active,
-               input[type="submit"]:active,
-               .widget input[type="button"]:active,
-               .widget input[type="reset"]:active,
-               .widget input[type="submit"]:active,
-               .content-sidebar .widget input[type="button"]:active,
-               .content-sidebar .widget input[type="reset"]:active,
-               .content-sidebar .widget input[type="submit"]:active {
-                       background-color: ' . $accent_light . ';
-               }
-
-               .site-navigation .current_page_item > a,
-               .site-navigation .current_page_ancestor > a,
-               .site-navigation .current-menu-item > a,
-               .site-navigation .current-menu-ancestor > a {
-                       color: ' . $accent_light . ';
-               }';
-
-       wp_add_inline_style( 'twentyfourteen-style', $css );
-}
-add_action( 'wp_enqueue_scripts', 'twentyfourteen_customizer_styles' );
-
-/**
</del><span class="cx">  * Add contextual help to the Themes and Post edit screens.
</span><span class="cx">  *
</span><span class="cx">  * @since Twenty Fourteen 1.0
</span></span></pre>
</div>
</div>

</body>
</html>