- Timestamp:
- 12/04/2013 10:08:59 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php
r26636 r26643 16 16 */ 17 17 function twentyfourteen_customize_register( $wp_customize ) { 18 // Add custom description to Colors and Background sections. 19 $wp_customize->get_section( 'colors' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' ); 20 $wp_customize->get_section( 'background_image' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' ); 21 18 22 // Add postMessage support for site title and description. 19 23 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; … … 21 25 $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; 22 26 27 // Rename the label to "Site Title Color" because this only effects the site title in this theme. 28 $wp_customize->get_control( 'header_textcolor' )->label = __( 'Site Title Color', 'twentyfourteen' ); 29 23 30 // Rename the label to "Display Site Title & Tagline" in order to make this option extra clear. 24 $wp_customize->add_control( 'display_header_text', array( 25 'settings' => 'header_textcolor', 26 'label' => __( 'Display Site Title & Tagline', 'twentyfourteen' ), 27 'section' => 'title_tagline', 28 'type' => 'checkbox', 29 ) ); 30 31 // Rename the label to "Site Title Color" because this only effects the site title in this theme. 32 $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_textcolor', array( 33 'label' => __( 'Site Title Color', 'twentyfourteen' ), 34 'section' => 'colors', 35 ) ) ); 36 37 // Add custom description to Colors and Background sections. 38 $wp_customize->get_section( 'colors' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' ); 39 $wp_customize->get_section( 'background_image' )->description = __( 'Background may only be visible on wide screens.', 'twentyfourteen' ); 31 $wp_customize->get_control( 'display_header_text' )->label = __( 'Display Site Title & Tagline', 'twentyfourteen' ); 40 32 41 33 // Add the featured content section in case it's not already there. … … 73 65 */ 74 66 function twentyfourteen_sanitize_layout( $layout ) { 75 if ( ! in_array( $layout, array( 'grid', 'slider' ) ) ) 67 if ( ! in_array( $layout, array( 'grid', 'slider' ) ) ) { 76 68 $layout = 'grid'; 69 } 77 70 78 71 return $layout;
Note: See TracChangeset
for help on using the changeset viewer.