add_panel( 'panel_id', array( 'priority' => 121, 'capability' => 'edit_theme_options', 'title' => __('Theme Design Options', 'feather-magazine'), 'description' => __('Theme Design Options', 'feather-magazine'), ) ); /***************************************************/ /***** Layout ****/ /**************************************************/ $wp_customize->add_section( 'feather_magazine_styling_settings', array( 'title' => __('All Blog Posts Settings','feather-magazine'), 'priority' => 122, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_section( 'feather_magazine_general_layout', array( 'title' => __('General Layout','feather-magazine'), 'priority' => 1, 'description' => __('Please refresh the page to view the changes you make.', 'feather-magazine'), 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting('feather_magazine_layout', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_key', 'default' => 'cslayout', )); /***************************************************/ /***** Coloring ****/ /**************************************************/ $wp_customize->add_setting( 'top_header_background_color', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'top_header_background_color', array( 'label' => __( 'Header Background Color', 'feather-magazine' ), 'section' => 'header_image', 'description' => __('Please refresh the page to view the changes you make.', 'feather-magazine'), 'priority' => 1, 'settings' => 'top_header_background_color', ) ) ); $wp_customize->add_setting( 'primary_colors', array( 'default' => '#c69c6d', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_colors', array( 'label' => __( 'Primary Color', 'feather-magazine' ), 'description' => __( 'Applied to header background.', 'feather-magazine' ), 'section' => 'feather_magazine_general_layout', 'priority' => 1, 'settings' => 'primary_colors', ) ) ); $wp_customize->add_setting( 'navigation_background_color', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'navigation_background_color', array( 'label' => __( 'Navigation Background Color', 'feather-magazine' ), 'section' => 'navigation_settings', 'priority' => 1, 'settings' => 'navigation_background_color', ) ) ); $wp_customize->add_setting( 'navigation_link_color', array( 'default' => '#333', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'navigation_link_color', array( 'label' => __( 'Navigation Link Color', 'feather-magazine' ), 'section' => 'navigation_settings', 'priority' => 1, 'settings' => 'navigation_link_color', ) ) ); /***************************************************/ /***** Info ****/ /**************************************************/ /***************************************************/ /***** Sections ****/ /**************************************************/ $wp_customize->add_section( 'colors', array( 'title' => __('Background Color','feather-magazine'), 'priority' => 150, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_section( 'static_front_page', array( 'title' => __('Static Front Page','feather-magazine'), 'priority' => 150, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_section( 'sidebars_settings', array( 'title' => __('Sidebar','feather-magazine'), 'priority' => 100, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_section( 'all_blog_posts', array( 'title' => __('All Blog Posts','feather-magazine'), 'priority' => 100, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'show_readmore_btn', array( 'default' => 0, 'sanitize_callback' => 'wp_kses', ) ); $wp_customize->add_control( 'show_readmore_btn', array( 'label' => __( 'Show Read More Button', 'feather-magazine' ), 'section' => 'all_blog_posts', 'priority' => 1, 'settings' => 'show_readmore_btn', 'type' => 'checkbox', ) ); $wp_customize->add_section( 'feather_magazine_header_settings', array( 'title' => __('Header','feather-magazine'), 'priority' => 122, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_section( 'navigation_settings', array( 'title' => __('Navigation Settings','feather-magazine'), 'priority' => 50, 'description' => __('Please refresh the page to view the changes you make.', 'feather-magazine'), 'capability' => 'edit_theme_options', ) ); /***************************************************/ /***** pagination ****/ /**************************************************/ $wp_customize->add_section( 'feather_magazine_pagination_settings', array( 'title' => __('Pagination Type','feather-magazine'), 'priority' => 122, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'feather_magazine_pagination_type', array( 'default' => '1', 'capability' => 'edit_theme_options', 'priority' => 1, 'sanitize_callback' => 'sanitize_key', )); /***************************************************/ /***** Footer ****/ /**************************************************/ $wp_customize->add_section( 'feather_magazine_footer_settings', array( 'title' => __('Footer','feather-magazine'), 'priority' => 122, 'capability' => 'edit_theme_options', ) ); $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->get_section('header_image')->title = __( 'Header', 'feather-magazine' ); $wp_customize->get_control( 'background_color' )->section = 'feather_magazine_general_layout'; $wp_customize->get_control( 'header_textcolor' )->section = 'header_image'; } add_action( 'customize_register', 'feather_magazine_customize_register' ); if(! function_exists('feather_magazine_color_output' ) ): function feather_magazine_color_output(){ ?>