Ticket #26408: 26408.patch
File 26408.patch, 1.0 KB (added by , 12 years ago) |
---|
-
wp-content/themes/twentyfourteen/inc/customizer.php
47 47 48 48 // Add the featured content layout setting and control. 49 49 $wp_customize->add_setting( 'featured_content_layout', array( 50 'default' => 'grid', 50 'default' => 'grid', 51 'sanitize_callback' => 'twentyfourteen_sanitize_layout', 51 52 ) ); 52 53 53 54 $wp_customize->add_control( 'featured_content_layout', array( … … 63 64 add_action( 'customize_register', 'twentyfourteen_customize_register' ); 64 65 65 66 /** 67 * Sanitize the Featured Content layout value. 68 * 69 * @since Twenty Fourteen 1.0 70 */ 71 function twentyfourteen_sanitize_layout( $layout ) { 72 if ( ! in_array( $layout, array( 'grid', 'slider' ) ) ) 73 $layout = 'grid'; 74 75 return $layout; 76 } 77 78 /** 66 79 * Bind JS handlers to make Theme Customizer preview reload changes asynchronously. 67 80 * 68 81 * @since Twenty Fourteen 1.0