Last active
April 11, 2016 13:07
-
-
Save saqibsarwar/ac29ad41ea75e276535d4c578b0c776b 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
<?php | |
if ( ! function_exists( 'inspiry_single_post_customizer' ) ) : | |
function inspiry_single_post_customizer( WP_Customize_Manager $wp_customize ) { | |
/** | |
* Single Post Section | |
*/ | |
$wp_customize->add_section( 'inspiry_single_post_options', array ( | |
'title' => __( 'Single Post', 'inspiry' ), | |
'priority' => 123, | |
) ); | |
/* Post Layout */ | |
$wp_customize->add_setting( 'inspiry_post_layout', array ( | |
'default' => 'one', | |
) ); | |
$wp_customize->add_control( 'inspiry_post_layout', array ( | |
'label' => __( 'Single Post Layout', 'inspiry' ), | |
'type' => 'radio', | |
'section' => 'inspiry_single_post_options', | |
'choices' => array ( | |
'one' => __( 'Full Width Layout', 'inspiry' ), | |
'two' => __( 'Layout With Sidebar', 'inspiry' ), | |
) | |
) ); | |
} | |
add_action( 'customize_register', 'inspiry_single_post_customizer' ); | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment