Ticket #23600: 23600.diff

File 23600.diff, 2.4 KB (added by SriniG, 3 months ago)
Line 
1Index: wp-content/themes/twentytwelve/functions.php
2===================================================================
3--- wp-content/themes/twentytwelve/functions.php        (revision 23482)
4+++ wp-content/themes/twentytwelve/functions.php        (working copy)
5@@ -436,6 +436,7 @@
6 function twentytwelve_customize_register( $wp_customize ) {
7        $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
8        $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
9+       $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
10 }
11 add_action( 'customize_register', 'twentytwelve_customize_register' );
12 
13@@ -445,6 +446,6 @@
14  * @since Twenty Twelve 1.0
15  */
16 function twentytwelve_customize_preview_js() {
17-       wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20120827', true );
18+       wp_enqueue_script( 'twentytwelve-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20130225', true );
19 }
20 add_action( 'customize_preview_init', 'twentytwelve_customize_preview_js' );
21Index: wp-content/themes/twentytwelve/inc/custom-header.php
22===================================================================
23--- wp-content/themes/twentytwelve/inc/custom-header.php        (revision 23482)
24+++ wp-content/themes/twentytwelve/inc/custom-header.php        (working copy)
25@@ -77,9 +77,10 @@
26                // If the user has set a custom color for the text, use that.
27                else :
28        ?>
29-               .site-title a,
30-               .site-description {
31-                       color: #<?php echo $text_color; ?> !important;
32+               .site-header h1 a,
33+               .site-header h1 a:hover,
34+               .site-header h2 {
35+                       color: #<?php echo $text_color; ?>;
36                }
37        <?php endif; ?>
38        </style>
39Index: wp-content/themes/twentytwelve/js/theme-customizer.js
40===================================================================
41--- wp-content/themes/twentytwelve/js/theme-customizer.js       (revision 23482)
42+++ wp-content/themes/twentytwelve/js/theme-customizer.js       (working copy)
43@@ -18,6 +18,13 @@
44                } );
45        } );
46 
47+       // Header text color
48+       wp.customize( 'header_textcolor', function( value ) {
49+               value.bind( function( to ) {
50+                       $( '.site-header h1 a, .site-header h2' ).css( 'color', to );
51+               } );
52+       } );
53+
54        // Hook into background color change and adjust body class value as needed.
55        wp.customize( 'background_color', function( value ) {
56                value.bind( function( to ) {