add_panel( 'atom_theme_panel', array( 'title' => esc_html__( 'Atom Theme Options', 'atom' ), 'description' => esc_html__( 'All Theme Options', 'atom' ), 'priority' => 10, ) ); /*========================== change the logo ===========================*/ $wp_customize->add_section( 'atom_logo_settings', array( 'title' => esc_html__( 'Logo Settings', 'atom' ), 'priority' => 10, 'panel' => 'atom_theme_panel', ) ); $wp_customize->add_setting( 'atom_logo', array( 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'atom_logo', array( 'label' => esc_html__( 'Logo', 'atom' ), 'section' => 'atom_logo_settings', 'settings' => 'atom_logo' ) ) ); /*========================== show/hide top-bar ===========================*/ $wp_customize->add_section( 'atom_header', array( 'title' => esc_html__( 'header Settings', 'atom' ), 'priority' => 10, 'panel' => 'atom_theme_panel', ) ); $wp_customize->add_setting( 'atom_header_setting_topbar', array( 'default' => 'block', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'atom_header_control_topbar', array( 'label' => esc_html__( 'Show/Hide Topbar', 'atom' ), 'section' => 'atom_header', 'settings' => 'atom_header_setting_topbar', 'type' => 'radio', 'choices' => array( 'block' => esc_html__( 'Show', 'atom' ), 'none' => esc_html__( 'Hide', 'atom' ), ), ) ); /*========================== left/right sidebar& style post ===========================*/ $wp_customize->add_section( 'atom_layout', array( 'title' => esc_html__( 'layout Settings', 'atom' ), 'priority' => 10, 'panel' => 'atom_theme_panel', ) ); $wp_customize->add_setting( 'atom_layout_setting_sidebar', array( 'default' => 'left', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'atom_layout_control_sidebar', array( 'label' => esc_html__( 'Left/Right sidebar', 'atom' ), 'section' => 'atom_layout', 'settings' => 'atom_layout_setting_sidebar', 'type' => 'radio', 'choices' => array( 'left' => esc_html__( 'Right Sidebar', 'atom' ), 'right' => esc_html__( 'Lafet sidebar', 'atom' ), 'full-width' => esc_html__( 'no sidebar', 'atom' ), ), ) ); $wp_customize->add_setting( 'atom_layout_post_setting', array( 'default' => 'style-1', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'atom_layout_post_control', array( 'label' => esc_html__( 'layout post setting', 'atom' ), 'section' => 'atom_layout', 'settings' => 'atom_layout_post_setting', 'type' => 'radio', 'choices' => array( 'style-1' => esc_html__( 'style 1', 'atom' ), 'style-2' => esc_html__( 'style 2', 'atom' ), ), ) ); $wp_customize->add_setting( 'atom_layout_grid_post_setting', array( 'default' => 'none', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'atom_layout_grid_post_control', array( 'label' => esc_html__( 'layout grid post setting', 'atom' ), 'section' => 'atom_layout', 'settings' => 'atom_layout_grid_post_setting', 'type' => 'radio', 'choices' => array( 'block' => esc_html__( 'Show', 'atom' ), 'none' => esc_html__( 'Hide', 'atom' ), ), ) ); /*========================== Color section ===========================*/ $wp_customize->add_section( 'atom_colors', array( 'title' => esc_html__( 'Color Settings', 'atom' ), 'priority' => 10, 'panel' => 'atom_theme_panel', 'description' => 'Modify theme colors' ) ); $wp_customize->add_setting( 'atom_background_color_setting', array( 'default' => '#fff', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'background_color', array( 'laber' => esc_html__( 'Edit Background-color', 'atom' ), 'section' => 'atom_colors', 'settings' => 'atom_background_color_setting', 'description' => 'Modify background colors' ) )); $wp_customize->add_setting( 'atom_text_color_setting', array( 'default' => '#333', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'text_color', array( 'laber' => esc_html__( 'Edit Text-color', 'atom' ), 'section' => 'atom_colors', 'settings' => 'atom_text_color_setting', 'description' => 'Modify text colors' ) )); $wp_customize->add_setting( 'atom_link_color_setting', array( 'default' => '#333', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_color', array( 'laber' => esc_html__( 'Edit Link-color', 'atom' ), 'section' => 'atom_colors', 'settings' => 'atom_link_color_setting', 'description' => 'Modify link colors' ) )); $wp_customize->add_setting( 'atom_primary_color_setting', array( 'default' => '#337ab7', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'primary_color', array( 'laber' => esc_html__( 'Edit Primary-color', 'atom' ), 'section' => 'atom_colors', 'settings' => 'atom_primary_color_setting', 'description' => 'Modify Primary colors' ) )); $wp_customize->add_setting( 'atom_link_hover_color_setting', array( 'default' => '#337ab7', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_hover_color', array( 'laber' => esc_html__( 'Edit link_hover-color', 'atom' ), 'section' => 'atom_colors', 'settings' => 'atom_link_hover_color_setting', 'description' => 'Modify Link hover colors' ) )); $wp_customize->add_setting( 'atom_topbar_color_setting', array( 'default' => '#333', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'topbar_color', array( 'laber' => esc_html__( 'Edit topbar color', 'atom' ), 'section' => 'atom_header', 'settings' => 'atom_topbar_color_setting', 'description' => 'Modify Top bar colors' ) )); $wp_customize->add_setting( 'atom_topbar_link_color_setting', array( 'default' => '#fff', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'link_hover_color', array( 'laber' => esc_html__( 'Edit topbar link color', 'atom' ), 'section' => 'atom_colors', 'settings' => 'atom_topbar_link_color_setting', 'description' => 'Modify Topbar link colors' ) )); /*========================== category ===========================*/ $wp_customize->add_section( 'atom_grid_category', array( 'title' => esc_html__( 'Grid category', 'atom' ), 'priority' => 10, 'panel' => 'atom_theme_panel', ) ); //colonna sinistra $wp_customize->add_setting( 'atom_grid_category_left_setting', array( 'default' => 'uncategorized', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'atom_grid_category_left_control', array( 'label' => esc_html__( 'left colomn', 'atom' ), 'section' => 'atom_grid_category', 'settings' => 'atom_grid_category_left_setting', 'type' => 'select', 'choices' => get_categories_select(), array ( 'slug' => 'Category Name' ), ) ); //colonna centrale $wp_customize->add_setting( 'atom_grid_category_center_setting', array( 'default' => 'uncategorized', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'atom_grid_category_center_control', array( 'label' => esc_html__( 'center colomn', 'atom' ), 'section' => 'atom_grid_category', 'settings' => 'atom_grid_category_center_setting', 'type' => 'select', 'choices' => get_categories_select(), array ( 'slug' => 'Category Name' ), ) ); //colonna destra $wp_customize->add_setting( 'atom_grid_category_right_setting', array( 'default' => 'uncategorized', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'atom_grid_category_right_control', array( 'label' => esc_html__( 'center colomn', 'atom' ), 'section' => 'atom_grid_category', 'settings' => 'atom_grid_category_right_setting', 'type' => 'select', 'choices' => get_categories_select(), array ( 'slug' => 'Category Name' ), ) ); } add_action('customize_register','atom_customize_register'); ?>