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(){ ?>