add_section( 'readmore_color', array( 'title' => __('Read More Text Color','bloggers-magazinely'), 'priority' => 1, 'description' => __( 'This is a child theme only feature', 'bloggers-magazinely' ), 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'readmore_color_picker', array( 'default' => '#8c8c8c', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'readmore_color_picker', array( 'label' => __( 'Read More Text Color', 'bloggers-magazinely' ), 'section' => 'readmore_color', 'priority' => 1, 'settings' => 'readmore_color_picker', ) ) ); function bloggers_magazinely_sanitize_radio( $input, $setting ){ $input = sanitize_key($input); $choices = $setting->manager->get_control( $setting->id )->choices; return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); } $wp_customize->add_section( 'featured_posts_header', array( 'title' => __('Featured Posts Settings','bloggers-magazinely'), 'description' => __('To make the featured posts section show up on your blog feed, you will have to add Sticky Posts, they will automatically be shown.','bloggers-magazinely'), 'priority' => 20, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting('featured_posts_toggle', array( 'sanitize_callback' => 'bloggers_magazinely_sanitize_radio', 'default' => 'gridtwo' )); $wp_customize->add_control( 'featured_posts_toggle', array( 'section' => 'featured_posts_header', 'label' => __( 'Show Featured Posts On', 'bloggers-magazinely' ), 'type' => 'radio', 'priority' => 2, 'choices' => array( 'gridtwo' => __('Grid 1 (5 Featured Posts)', 'bloggers-magazinely'), 'gridone' => __('Grid 2 (4 Featured Posts)', 'bloggers-magazinely'), ), )); } add_action( 'customize_register', 'bloggers_magazinely_customize_register', 999 ); if(! function_exists('bloggers_magazinely_customize_register_output' ) ): function bloggers_magazinely_customize_register_output(){ ?> 'Social Share & Follow Buttons', 'slug' => 'superb-social-share-and-follow-buttons', 'required' => false, ), ); /* * Array of configuration settings. Amend each line as needed. * * TGMPA will start providing localized text strings soon. If you already have translations of our standard * strings available, please help us make TGMPA even better by giving us access to these translations or by * sending in a pull-request with .po file(s) with the translations. * * Only uncomment the strings in the config array if you want to customize the strings. */ $config = array( 'id' => 'bloggers-magazinely', // 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 ); }