add_section( new ALAGU_WP_Customize_Section( $wp_customize, 'site-general-section', array( 'title' => esc_html__('Site General', 'alagu'), 'priority' => 1 ) ) ); /** * Option : Custom Header */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[site-custom-header]', array( 'default' => alagu_get_option( 'site-custom-header', '' ), 'type' => 'option', 'sanitize_callback' => array( 'ALAGU_Customizer_Sanitizes', 'sanitize_choices' ), ) ); $wp_customize->add_control( new ALAGU_Customize_Control( $wp_customize, ALAGU_THEME_SETTINGS . '[site-custom-header]', array( 'type' => 'select', 'section' => 'site-general-section', 'label' => esc_html__( 'Site Header', 'alagu' ), 'choices' => alagu_get_customizer_cpt_post_list( 'dt_headers', esc_html__('Select Header', 'alagu' ) ), 'description' => esc_html__('Choose the header for your site.', 'alagu'), ) )); /** * Phone No */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[header-top-phone-no]', array( 'default' => alagu_get_option( 'header-top-phone-no' ), 'type' => 'option', 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new ALAGU_Customize_Control( $wp_customize, ALAGU_THEME_SETTINGS . '[header-top-phone-no]', array( 'type' => 'text', 'section' => 'site-general-section', 'label' => esc_html__( 'Phone No', 'alagu' ), 'description' => esc_html__('Enter phone number to show at top', 'alagu'), 'dependency' => array( 'site-custom-header', '==', '' ), ) ) ); /** * Email ID */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[header-top-email-id]', array( 'default' => alagu_get_option( 'header-top-email-id' ), 'type' => 'option', 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new ALAGU_Customize_Control( $wp_customize, ALAGU_THEME_SETTINGS . '[header-top-email-id]', array( 'type' => 'text', 'section' => 'site-general-section', 'label' => esc_html__( 'Email ID', 'alagu' ), 'description' => esc_html__('Enter email id to show at top', 'alagu'), 'dependency' => array( 'site-custom-header', '==', '' ), ) ) ); /** * Top Link 1 Text */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[header-top-link-1-text]', array( 'default' => alagu_get_option( 'header-top-link-1-text' ), 'type' => 'option', 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new ALAGU_Customize_Control( $wp_customize, ALAGU_THEME_SETTINGS . '[header-top-link-1-text]', array( 'type' => 'text', 'section' => 'site-general-section', 'label' => esc_html__( 'Top Link 1 Text', 'alagu' ), 'description' => esc_html__('Enter top link text to show at top', 'alagu'), 'dependency' => array( 'site-custom-header', '==', '' ), ) ) ); /** * Top Link 1 URL */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[header-top-link-1]', array( 'default' => alagu_get_option( 'header-top-link-1' ), 'type' => 'option', 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new ALAGU_Customize_Control( $wp_customize, ALAGU_THEME_SETTINGS . '[header-top-link-1]', array( 'type' => 'text', 'section' => 'site-general-section', 'label' => esc_html__( 'Top Link 1', 'alagu' ), 'description' => esc_html__('Enter top link to show at top', 'alagu'), 'dependency' => array( 'site-custom-header|header-top-link-1-text', '==|!=', '|' ), ) ) ); /** * Top Link 2 Text */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[header-top-link-2-text]', array( 'default' => alagu_get_option( 'header-top-link-2-text' ), 'type' => 'option', 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new ALAGU_Customize_Control( $wp_customize, ALAGU_THEME_SETTINGS . '[header-top-link-2-text]', array( 'type' => 'text', 'section' => 'site-general-section', 'label' => esc_html__( 'Top Link 2 Text', 'alagu' ), 'description' => esc_html__('Enter top link text to show at top', 'alagu'), 'dependency' => array( 'site-custom-header', '==', '' ), ) ) ); /** * Top Link 2 URL */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[header-top-link-2]', array( 'default' => alagu_get_option( 'header-top-link-2' ), 'type' => 'option', 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new ALAGU_Customize_Control( $wp_customize, ALAGU_THEME_SETTINGS . '[header-top-link-2]', array( 'type' => 'text', 'section' => 'site-general-section', 'label' => esc_html__( 'Top Link 2', 'alagu' ), 'description' => esc_html__('Enter top link to show at top', 'alagu'), 'dependency' => array( 'site-custom-header|header-top-link-2-text', '==|!=', '|' ), ) ) ); /** * Divider */ $wp_customize->add_control( new ALAGU_Customize_Control_Separator( $wp_customize, ALAGU_THEME_SETTINGS . '[default-header-separator]', array( 'type' => 'dt-separator', 'section' => 'site-general-section', 'settings' => array(), 'dependency' => array( 'site-custom-header', '==', '' ), ) ) ); /** * Option : Custom Footer */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[site-custom-footer]', array( 'default' => alagu_get_option( 'site-custom-footer', '' ), 'type' => 'option', 'sanitize_callback' => array( 'ALAGU_Customizer_Sanitizes', 'sanitize_choices' ), ) ); $wp_customize->add_control( new ALAGU_Customize_Control( $wp_customize, ALAGU_THEME_SETTINGS . '[site-custom-footer]', array( 'type' => 'select', 'section' => 'site-general-section', 'label' => esc_html__( 'Site Footer', 'alagu' ), 'choices' => alagu_get_customizer_cpt_post_list( 'dt_footers', esc_html__('Select Footer', 'alagu' ) ), 'description' => esc_html__('Choose the footer for your site.', 'alagu'), ) )); /** * Option : Default Footer */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[default-footer-option]', array( 'default' => alagu_get_option( 'default-footer-option', '' ), 'type' => 'option', 'sanitize_callback' => array( 'ALAGU_Customizer_Sanitizes', 'sanitize_choices' ), ) ); $wp_customize->add_control( new ALAGU_Customize_Control( $wp_customize, ALAGU_THEME_SETTINGS . '[default-footer-option]', array( 'type' => 'select', 'section' => 'site-general-section', 'label' => esc_html__( 'Site Footer', 'alagu' ), 'choices' => array( '' => esc_html__('Default', 'alagu' ), 'column' => esc_html__('Three Column', 'alagu' ), 'text' => esc_html__('Custom Text', 'alagu' ), 'column-text' => esc_html__('Three Column + Custom Text', 'alagu' ), ), 'description' => esc_html__('Choose the footer layout for your site.', 'alagu'), 'dependency' => array( 'site-custom-footer', '==', '' ), ) ) ); /** * Footer Text */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[default-footer-text]', array( 'default' => alagu_get_option( 'default-footer-text' ), 'type' => 'option', 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new ALAGU_Customize_Control( $wp_customize, ALAGU_THEME_SETTINGS . '[default-footer-text]', array( 'type' => 'textarea', 'section' => 'site-general-section', 'label' => esc_html__( 'Footer Text', 'alagu' ), 'dependency' => array( 'site-custom-footer|default-footer-option', '==|any', '|text,column-text' ), ) ) ); /** * Divider */ $wp_customize->add_control( new ALAGU_Customize_Control_Separator( $wp_customize, ALAGU_THEME_SETTINGS . '[default-footer-separator]', array( 'type' => 'dt-separator', 'section' => 'site-general-section', 'settings' => array(), 'dependency' => array( 'site-custom-footer', '==', '' ), ) ) ); /** * Option : Show Loader */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[show-loader]', array( 'default' => alagu_get_option( 'show-loader' ), 'type' => 'option', 'sanitize_callback' => array( 'ALAGU_Customizer_Sanitizes', 'sanitize_tweek' ), ) ); $wp_customize->add_control( new ALAGU_Customize_Control_Switch( $wp_customize, ALAGU_THEME_SETTINGS . '[show-loader]', array( 'type' => 'dt-switch', 'label' => esc_html__( 'Site Loader', 'alagu'), 'section' => 'site-general-section', 'choices' => array( 'on' => esc_attr__( 'Yes', 'alagu' ), 'off' => esc_attr__( 'No', 'alagu' ) ) ) ) ); /** * Option : Show Page Comments */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[show-pagecomments]', array( 'default' => alagu_get_option( 'show-pagecomments' ), 'type' => 'option', 'sanitize_callback' => array( 'ALAGU_Customizer_Sanitizes', 'sanitize_tweek' ), ) ); $wp_customize->add_control( new ALAGU_Customize_Control_Switch( $wp_customize, ALAGU_THEME_SETTINGS . '[show-pagecomments]', array( 'type' => 'dt-switch', 'label' => esc_html__( 'Globally Show Page Comments', 'alagu'), 'section' => 'site-general-section', 'description' => esc_html__('YES! to show comments on all the pages. This will globally override your "Allow comments" option under your page "Discussion" settings.', 'alagu'), 'choices' => array( 'on' => esc_attr__( 'Yes', 'alagu' ), 'off' => esc_attr__( 'No', 'alagu' ) ) ) ) ); /** * Option : Show all Pages in Pagination */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[showall-pagination]', array( 'default' => alagu_get_option( 'showall-pagination' ), 'type' => 'option', 'sanitize_callback' => array( 'ALAGU_Customizer_Sanitizes', 'sanitize_tweek' ), ) ); $wp_customize->add_control( new ALAGU_Customize_Control_Switch( $wp_customize, ALAGU_THEME_SETTINGS . '[showall-pagination]', array( 'type' => 'dt-switch', 'label' => esc_html__( 'Show all pages in Pagination', 'alagu'), 'section' => 'site-general-section', 'description' => esc_html__('YES! to show all the pages instead of dots near the current page.', 'alagu'), 'choices' => array( 'on' => esc_attr__( 'Yes', 'alagu' ), 'off' => esc_attr__( 'No', 'alagu' ) ) ) ) ); /** * Option : Show To Top */ $wp_customize->add_setting( ALAGU_THEME_SETTINGS . '[show-to-top]', array( 'default' => alagu_get_option( 'show-to-top' ), 'type' => 'option', 'sanitize_callback' => array( 'ALAGU_Customizer_Sanitizes', 'sanitize_tweek' ), ) ); $wp_customize->add_control( new ALAGU_Customize_Control_Switch( $wp_customize, ALAGU_THEME_SETTINGS . '[show-to-top]', array( 'type' => 'dt-switch', 'label' => esc_html__( 'Show To Top', 'alagu'), 'section' => 'site-general-section', 'description' => esc_html__('YES! to enable to top for your site.', 'alagu'), 'choices' => array( 'on' => esc_attr__( 'Yes', 'alagu' ), 'off' => esc_attr__( 'No', 'alagu' ) ) ) ) ); if ( ! defined( 'ALAGU_PRO_VER' ) ) { /** * Divider : Separator 1 */ $wp_customize->add_control( new ALAGU_Customize_Control_Separator( $wp_customize, ALAGU_THEME_SETTINGS . '[dt-site-general-pro-separator]', array( 'type' => 'dt-separator', 'section' => 'site-general-section', 'settings' => array(), 'description' => '

' . __( 'More Options Available in Alagu Pro!', 'alagu' ) . '

' . __( 'Learn More', 'alagu' ) . '', ) ) ); } do_action( 'alagu-site-general-pro-settings' );