Ticket #30160: 30160.diff
| File 30160.diff, 3.1 KB (added by , 12 years ago) |
|---|
-
src/wp-content/themes/twentyfifteen/js/color-scheme-control.js
1 1 /* global colorScheme */ 2 2 /** 3 * Customizer enhancements for a better user experience. 4 * 5 * Adds listener to Color Scheme control to update other color controls with new values/defaults 3 * Add a listener to the Color Scheme control to update other color controls to new values/defaults. 6 4 */ 7 5 8 6 ( function( wp ) { … … 16 14 sidebarTextColor = parentSection.find( '#customize-control-sidebar_textcolor .color-picker-hex' ); 17 15 18 16 this.setting.bind( 'change', function( value ) { 19 // if Header Text is not hidden, update value17 // If Header Text is not hidden, update value. 20 18 if ( 'blank' !== wp.customize( 'header_textcolor' ).get() ) { 21 19 wp.customize( 'header_textcolor' ).set( colorScheme[value].colors[4] ); 22 20 headerTextColor.val( colorScheme[value].colors[4] ) … … 25 23 .wpColorPicker( 'defaultColor', colorScheme[value].colors[4] ); 26 24 } 27 25 28 // update Background Color26 // Update Background Color. 29 27 wp.customize( 'background_color' ).set( colorScheme[value].colors[0] ); 30 28 backgroundColor.val( colorScheme[value].colors[0] ) 31 29 .data( 'data-default-color', colorScheme[value].colors[0] ) … … 32 30 .wpColorPicker( 'color', colorScheme[value].colors[0] ) 33 31 .wpColorPicker( 'defaultColor', colorScheme[value].colors[0] ); 34 32 35 // update Header/Sidebar Background Color33 // Update Header/Sidebar Background Color. 36 34 wp.customize( 'header_background_color' ).set( colorScheme[value].colors[1] ); 37 35 sidebarColor.val( colorScheme[value].colors[1] ) 38 36 .data( 'data-default-color', colorScheme[value].colors[1] ) … … 39 37 .wpColorPicker( 'color', colorScheme[value].colors[1] ) 40 38 .wpColorPicker( 'defaultColor', colorScheme[value].colors[1] ); 41 39 42 // update Sidebar Text Color40 // Update Sidebar Text Color. 43 41 wp.customize( 'sidebar_textcolor' ).set( colorScheme[value].colors[4] ); 44 42 sidebarTextColor.val( colorScheme[value].colors[4] ) 45 43 .data( 'data-default-color', colorScheme[value].colors[4] ) -
src/wp-content/themes/twentyfifteen/js/customize-preview.js
1 /** 2 * Live-update changed settings in real time in the Customizer preview. 3 */ 4 5 ( function( $ ) { 6 // Site title and description. 7 wp.customize( 'blogname', function( value ) { 8 value.bind( function( to ) { 9 $( '.site-title a' ).text( to ); 10 } ); 11 } ); 12 wp.customize( 'blogdescription', function( value ) { 13 value.bind( function( to ) { 14 $( '.site-description' ).text( to ); 15 } ); 16 } ); 17 } )( jQuery ); 18 No newline at end of file
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)