add_section('swiftpress_blog_section', array( 'priority' => 6, 'title' =>__('Blog Section', 'swiftpress'), 'panel' => 'swiftpress_home_options' )); $wp_customize->add_setting( 'blog_enable', array( 'capability' => 'edit_theme_options', 'default' => '1', 'sanitize_callback' => 'swiftpress_theme_sanitize_text' ) ); $wp_customize->add_control( 'blog_enable', array( 'settings' => 'blog_enable', 'label' => __( 'Enable/Disable Blog Section', 'swiftpress' ), 'section' => 'swiftpress_blog_section', 'type' => 'radio', 'choices' => array( '1' => __( 'Enable', 'swiftpress' ), '2' => __( 'Disable', 'swiftpress' ), ), 'priority' => 20 ) ); $wp_customize->add_setting('blog_title',array( 'sanitize_callback' => 'swiftpress_theme_sanitize_text', 'capability' => 'edit_theme_options', 'default' => __('Blog ','swiftpress'), 'transport'=>'postMessage' )); $wp_customize->add_control('blog_title',array( 'label' =>__('Blog Title', 'swiftpress'), 'section' => 'swiftpress_blog_section', 'type' => 'text', 'capability' => 'edit_theme_options', 'priority' => 20 )); $wp_customize->add_setting('blog_content',array( 'sanitize_callback' => 'swiftpress_theme_sanitize_text', 'capability' => 'edit_theme_options', 'transport'=>'postMessage', 'default' => __('Welcome to Swift Plus Blog , Simple yet complete theme for business','swiftpress') )); $wp_customize->add_control('blog_content',array( 'label' =>__('Blog Description', 'swiftpress'), 'section' => 'swiftpress_blog_section', 'type' => 'textarea', 'capability' => 'edit_theme_options', 'priority' => 20 )); $wp_customize->add_setting( 'blog_no_of_posts', array( 'capability' => 'edit_theme_options', 'default' => '2', 'sanitize_callback' => 'swiftpress_theme_sanitize_text' ) ); $wp_customize->add_control( 'blog_no_of_posts', array( 'settings' => 'blog_no_of_posts', 'label' => __( 'No Of Posts To Show On Blog Section', 'swiftpress' ), 'section' => 'swiftpress_blog_section', 'type' => 'select', 'choices' => array( '2' => __( '2', 'swiftpress' ), '4' => __( '4', 'swiftpress' ), '6' => __( '6', 'swiftpress' ), ), 'priority' => 20 ) ); $wp_customize->add_setting('swiftpress_blog_category_display',array( 'sanitize_callback' => 'swiftpress_theme_sanitize_category', 'capability' => 'edit_theme_options', 'default' => '' )); $wp_customize->add_control(new swiftpress_Customize_Dropdown_Taxonomies_Control($wp_customize,'swiftpress_blog_category_display',array( 'label' => __('Choose blog category','swiftpress'), 'section' => 'swiftpress_blog_section', 'settings' => 'swiftpress_blog_category_display', 'type'=> 'dropdown-taxonomies', 'priority' => 20 ) )); $wp_customize->add_setting( 'view_enable', array( 'capability' => 'edit_theme_options', 'default' => '1', 'sanitize_callback' => 'swiftpress_theme_sanitize_text' ) ); $wp_customize->add_control( 'view_enable', array( 'settings' => 'view_enable', 'label' => __( 'Enable/Disable View All Text', 'swiftpress' ), 'section' => 'swiftpress_blog_section', 'type' => 'radio', 'choices' => array( '1' => __( 'Enable', 'swiftpress' ), '2' => __( 'Disable', 'swiftpress' ), ), 'priority' => 20 ) ); $wp_customize->add_setting( 'view_text', array( 'capability' => 'edit_theme_options', 'default' => __('View All','swiftpress'), 'sanitize_callback' => 'swiftpress_theme_sanitize_text' ) ); $wp_customize->add_control( 'view_text', array( 'settings' => 'view_text', 'label' => __( 'View All Text', 'swiftpress' ), 'section' => 'swiftpress_blog_section', 'type' => 'text', 'priority' => 20 ) );