get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->get_control( 'header_textcolor' )->section = 'customize_navigation'; $wp_customize->get_section('title_tagline')->title = __( 'Navigation & Header Settings', 'magazinely' ); $wp_customize->get_section('background_image')->title = __( 'Post & Page Settings', 'magazinely' ); $wp_customize->get_section( 'background_image' )->priority = 20; if ( isset( $wp_customize->selective_refresh ) ) { $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-title a', 'render_callback' => 'sp_magazinely_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => 'sp_magazinely_customize_partial_blogdescription', ) ); } /* Customize Navigation */ $wp_customize->add_setting( 'display_navigation_tagline', array( 'default' => 0, 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'display_navigation_tagline', array( 'label' => __( 'Show Site Tagline', 'magazinely' ), 'section' => 'title_tagline', 'priority' => 30, 'settings' => 'display_navigation_tagline', 'type' => 'checkbox', ) ); /* Featured Posts Header Section Settings */ $wp_customize->add_section( 'featured_posts_header', array( 'title' => __('Featured Posts Settings','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.','magazinely'), 'priority' => 20, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting('featured_posts_toggle', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'gridone' )); $wp_customize->add_control( 'featured_posts_toggle', array( 'section' => 'featured_posts_header', 'label' => __( 'Show Featured Posts On', 'magazinely' ), 'type' => 'radio', 'priority' => 1, 'choices' => array( 'gridone' => __('Grid 1 (4 Featured Posts)', 'magazinely'), 'gridtwo' => __('Grid 2 (5 Featured Posts)', 'magazinely'), ), )); $wp_customize->add_setting( 'featured_posts_categories_hide', array( 'default' => 0, 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'featured_posts_categories_hide', array( 'label' => __( 'Hide Categories', 'magazinely' ), 'section' => 'featured_posts_header', 'priority' => 9999, 'settings' => 'featured_posts_categories_hide', 'type' => 'checkbox', ) ); /* Posts And Pages Settings */ $wp_customize->add_setting( 'hide_featured_image', array( 'default' => 0, 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'hide_featured_image', array( 'label' => __( 'Hide Featured Image', 'magazinely' ), 'description' => __( 'This will hide featured images from all single posts. It will not effect the blog feed.', 'magazinely' ), 'section' => 'background_image', 'priority' => 1, 'settings' => 'hide_featured_image', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'hide_about_the_author_section', array( 'default' => 0, 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'hide_about_the_author_section', array( 'label' => __( 'Hide About The Author Section', 'magazinely' ), 'description' => __( 'Enabling this will hide the About The Author section on all blog posts.', 'magazinely' ), 'section' => 'background_image', 'priority' => 1, 'settings' => 'hide_about_the_author_section', 'type' => 'checkbox', ) ); } add_action( 'customize_register', 'sp_magazinely_customize_register' ); if(! function_exists('sp_magazinely_customize_register_output' ) ): function sp_magazinely_customize_register_output(){ ?>