Last active
September 29, 2015 22:30
-
-
Save lizkaraffa/4ed4b6cba0a30bd49b8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function swell_theme_customizer( $wp_customize ) { | |
//-------------------------------------------------------------------------------------------------------------------// | |
// Page Templates | |
//-------------------------------------------------------------------------------------------------------------------// | |
$wp_customize->add_section( 'swell_templates_section' , array( | |
'title' => __( 'Page Templates', 'swelltheme' ), | |
'priority' => 103, | |
) ); | |
// Featured Page Left | |
$wp_customize->add_setting( 'page_one', array( | |
'default' => '2', | |
'sanitize_callback' => 'swell_sanitize_pages', | |
) ); | |
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'page_one', array( | |
'label' => __( 'Home Template Page Left', 'swelltheme' ), | |
'section' => 'swell_templates_section', | |
'settings' => 'page_one', | |
'post_type' => 'program', | |
'type' => 'dropdown-pages', | |
'priority' => 20, | |
) ) ); | |
// Featured Page Middle | |
$wp_customize->add_setting( 'page_two', array( | |
'default' => '2', | |
'sanitize_callback' => 'swell_sanitize_pages', | |
) ); | |
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'page_two', array( | |
'label' => __( 'Home Template Page Mid', 'swelltheme' ), | |
'section' => 'swell_templates_section', | |
'settings' => 'page_two', | |
'post_type' => 'program', | |
'type' => 'dropdown-pages', | |
'priority' => 40, | |
) ) ); | |
// Featured Page Right | |
$wp_customize->add_setting( 'page_three', array( | |
'default' => '2', | |
'sanitize_callback' => 'swell_sanitize_pages', | |
) ); | |
$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'page_three', array( | |
'label' => __( 'Home Template Page Right', 'swelltheme' ), | |
'section' => 'swell_templates_section', | |
'settings' => 'page_three', | |
'post_type' => 'program', | |
'type' => 'dropdown-pages', | |
'priority' => 60, | |
) ) ); | |
} | |
add_action('customize_register', 'swell_theme_customizer'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment