Changeset 30230
- Timestamp:
- 11/04/2014 06:41:56 PM (10 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfifteen
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfifteen/css/admin-custom-header.css
r30046 r30230 33 33 margin-top: 0.5em; 34 34 opacity: 0.7; 35 } 36 37 /* Hide the header text color option */ 38 .appearance_page_custom-header tr.displaying-header-text { 39 display: none; 35 40 } 36 41 -
trunk/src/wp-content/themes/twentyfifteen/inc/custom-header.php
r30221 r30230 80 80 function twentyfifteen_header_style() { 81 81 $header_image = get_header_image(); 82 $text_color = get_header_textcolor();83 82 84 83 // If no custom options for text are set, let's bail. 85 if ( empty( $header_image ) && $text_color == get_theme_support( 'custom-header', 'default-text-color') ) {84 if ( empty( $header_image ) && display_header_text() ) { 86 85 return; 87 86 } … … 126 125 position: absolute; 127 126 } 128 <?php129 // If the user has set a custom color for the text use that130 elseif ( $text_color != get_theme_support( 'custom-header', 'default-text-color' ) ) :131 ?>132 .site-title a,133 .site-title a:hover,134 .site-title a:focus,135 .site-description {136 color: #<?php echo esc_attr( $text_color ); ?>;137 }138 127 <?php endif; ?> 139 128 </style> … … 229 218 $css = ' 230 219 /* Custom Sidebar Text Color */ 220 .site-title a, 221 .site-description, 231 222 .secondary-toggle:before { 232 223 color: %1$s; 224 } 225 226 .site-title a:hover, 227 .site-title a:focus { 228 color: %1$s; /* Fallback for IE7 and IE8 */ 229 color: %2$s; 233 230 } 234 231 -
trunk/src/wp-content/themes/twentyfifteen/inc/customizer.php
r30208 r30230 36 36 ) ); 37 37 38 // Add custom sidebar text color setting and control.38 // Add custom header and sidebar text color setting and control. 39 39 $wp_customize->add_setting( 'sidebar_textcolor', array( 40 40 'default' => $color_scheme[4], … … 43 43 44 44 $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sidebar_textcolor', array( 45 'label' => __( 'Sidebar Text Color', 'twentyfifteen' ),45 'label' => esc_html__( 'Header & Sidebar Text Color', 'twentyfifteen' ), 46 46 'section' => 'colors', 47 47 ) ) ); 48 48 49 // Add custom header background color setting and control. 49 // Remove the core header textcolor control, as it shares the sidebar text color. 50 $wp_customize->remove_control( 'header_textcolor' ); 51 52 // Add custom header and sidebar background color setting and control. 50 53 $wp_customize->add_setting( 'header_background_color', array( 51 54 'default' => $color_scheme[1], … … 54 57 55 58 $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_background_color', array( 56 'label' => esc_html__( 'Header & Sidebar Background Color', 'twentyfifteen' ),59 'label' => esc_html__( 'Header & Sidebar Background Color', 'twentyfifteen' ), 57 60 'section' => 'colors', 58 61 ) ) ); -
trunk/src/wp-content/themes/twentyfifteen/js/color-scheme-control.js
r30126 r30230 11 11 if ( 'color_scheme' === this.id ) { 12 12 this.setting.bind( 'change', function( value ) { 13 // If Header Text is not hidden, update value.14 if ( 'blank' !== api( 'header_textcolor' ).get() ) {15 api( 'header_textcolor' ).set( colorScheme[value].colors[4] );16 api.control( 'header_textcolor' ).container.find( '.color-picker-hex' )17 .data( 'data-default-color', colorScheme[value].colors[4] )18 .wpColorPicker( 'defaultColor', colorScheme[value].colors[4] );19 }20 21 13 // Update Background Color. 22 14 api( 'background_color' ).set( colorScheme[value].colors[0] ); … … 31 23 .wpColorPicker( 'defaultColor', colorScheme[value].colors[1] ); 32 24 33 // Update Sidebar Text Color.25 // Update Header/Sidebar Text Color. 34 26 api( 'sidebar_textcolor' ).set( colorScheme[value].colors[4] ); 35 27 api.control( 'sidebar_textcolor' ).container.find( '.color-picker-hex' )
Note: See TracChangeset
for help on using the changeset viewer.