add_section( 'blogling_settings', array( 'title' => __('Blogling Settings','blogling'), 'priority' => 1, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'show_post_categories', array( 'default' => 0, 'sanitize_callback' => 'blogling_sanitize_checkbox', ) ); $wp_customize->add_control( 'show_post_categories', array( 'label' => __( 'Hide post categories', 'blogling' ), 'section' => 'blogling_settings', 'priority' => 1, 'settings' => 'show_post_categories', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'show_post_page_byline', array( 'default' => 0, 'sanitize_callback' => 'blogling_sanitize_checkbox', ) ); $wp_customize->add_control( 'show_post_page_byline', array( 'label' => __( 'Hide post/page author', 'blogling' ), 'section' => 'blogling_settings', 'priority' => 1, 'settings' => 'show_post_page_byline', 'type' => 'checkbox', ) ); function blogling_sanitize_checkbox( $input ) { // Boolean check return ( ( isset( $input ) && true == $input ) ? true : false ); } } add_action( 'customize_register', 'blogling_customize_register' ); if(! function_exists('blogling_customizer_css_final_output' ) ): function blogling_customizer_css_final_output(){ ?> 'Social Share and Follow Buttons', 'slug' => 'superb-social-share-and-follow-buttons', 'required' => false, ), array( 'name' => 'Tables', 'slug' => 'superb-tables', 'required' => false, ), ); $config = array( 'id' => 'blogling', // Unique ID for hashing notices for multiple instances of TGMPA. 'default_path' => '', // Default absolute path to bundled plugins. 'menu' => 'tgmpa-install-plugins', // Menu slug. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => false, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. ); tgmpa( $plugins, $config ); }