description; } } /** |------------------------------------------------------------------------------ | OPTIONS |------------------------------------------------------------------------------ */ $wp_customize->add_panel( 'panel_general', array( 'priority' => 30, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Options General', 'amazorize' ) )); /******************* * Section: Layout * ********************/ $wp_customize->add_section( 'amazorize_general_page_controllers' , array( 'title' => __( 'Customizer', 'amazorize' ), 'priority' => 1, 'panel' => 'panel_general' )); /* Primary Color */ $wp_customize->add_setting( 'amazorize_general_primary_color', array( 'default' => '#fba419', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize, 'amazorize_general_primary_color', array( 'label' => __( 'Primary Color', 'amazorize' ), 'section' => 'amazorize_general_page_controllers', 'settings' => 'amazorize_general_primary_color', 'priority' => 2, ))); /* General Layout */ $wp_customize->add_setting( 'amazorize_general_layout_style', array( 'default' => 'list-layout', 'transport' => 'refresh', 'sanitize_callback' => 'skyrocket_radio_sanitization' ) ); $wp_customize->add_control( 'amazorize_general_layout_style', array( 'label' => __( 'Layout Style', 'amazorize'), 'section' => 'amazorize_general_page_controllers', 'priority' => 3, 'type' => 'select', 'capability' => 'edit_theme_options', 'choices' => array( 'list-layout' => __( 'List', 'amazorize'), 'grid-layout' => __( 'Grid', 'amazorize'), ) ) ); $wp_customize->add_setting( 'amazorize_general_layout', array('sanitize_callback' => 'amazorize_sanitize_select', 'default' => 'right_sidebar')); $wp_customize->add_control( 'amazorize_general_layout', array( 'type' => 'radio', 'label' => __( 'Layout Style', 'amazorize' ), 'section' => 'amazorize_general_page_controllers', 'priority' => 4, 'choices' => array( 'none_sidebar' => __('None Sidebar', 'amazorize'), 'left_sidebar' => __('Left Sidebar', 'amazorize'), 'right_sidebar' => __('Right Sidebar', 'amazorize'), ), )); /* Excerpt Length */ $wp_customize->add_setting('amazorize_general_excerpt_lengh', array('sanitize_callback' => 'amazorize_sanitize_number_absint', 'default' => 20)); $wp_customize->add_control( 'amazorize_general_excerpt_lengh', array( 'type' => 'number', 'label' => __( 'Excerpt Length', 'amazorize' ), 'section' => 'amazorize_general_page_controllers', 'description' => __( 'Expert Length is the number of words to show in Home/Archive pages.', 'amazorize'), 'priority' => 5, )); /* Excerpt End Text */ $wp_customize->add_setting('amazorize_general_excerpt_end_text', array('sanitize_callback' => 'amazorize_sanitize_html', 'default' => ' ...')); $wp_customize->add_control( 'amazorize_general_excerpt_end_text', array( 'type' => 'text', 'label' => __( 'Excerpt Ending Text', 'amazorize' ), 'section' => 'amazorize_general_page_controllers', 'priority' => 6, )); /* Choose Pagination Type */ $wp_customize->add_setting('amazorize_general_pagination_mode', array('sanitize_callback' => 'amazorize_sanitize_select', 'default' => 'default', 'capability' => 'edit_theme_options' )); $wp_customize->add_control( 'amazorize_general_pagination_mode', array( 'type' => 'radio', 'label' => __( 'Choose Pagination Type', 'amazorize' ), 'section' => 'amazorize_general_page_controllers', 'priority' => 7, 'choices' => array( 'default' => __('Default (Older Posts/Newer Posts)', 'amazorize'), 'numberal' => __('Numberal (1 2 3 ..)', 'amazorize'), ), ));