PATH:
home
/
centosnipponia
/
public_html
/
sweetrich
/
wp-content
/
themes
/
sydney-pro-ii
/
inc
/
customizer
/
options
<?php /** * Top bar Customizer options * * @package Sydney */ /** * Top bar */ $wp_customize->add_section( 'sydney_section_top_bar', array( 'title' => esc_html__( 'Top bar', 'sydney'), 'panel' => 'sydney_panel_header', ) ); $wp_customize->add_setting( 'sydney_topbar_tabs', array( 'default' => '', 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Tab_Control ( $wp_customize, 'sydney_topbar_tabs', array( 'label' => '', 'section' => 'sydney_section_top_bar', 'controls_general' => json_encode( array( '#customize-control-topbar_login_divider_1','#customize-control-topbar_login_title','#customize-control-topbar_login_side_image','#customize-control-topbar_login_text','#customize-control-topbar_logout_text','#customize-control-topbar_register_text','#customize-control-topbar_login_redirect_url','#customize-control-topbar_login_custom_register','#customize-control-topbar_login_icons','#customize-control-shortcode_topbar_divider_1','#customize-control-topbar_shortcode_title','#customize-control-topbar_shortcode_content','#customize-control-html_topbar_divider_1','#customize-control-topbar_html_title','#customize-control-topbar_html_content','#customize-control-wpml_topbar_divider_1','#customize-control-wpml_lang_switcher_title','#customize-control-wpml_lang_switcher','#customize-control-pll_topbar_divider_1','#customize-control-pll_lang_switcher_title','#customize-control-pll_lang_switcher_show_flags','#customize-control-pll_lang_switcher_show_names','#customize-control-pll_lang_switcher_dropdown','#customize-control-pll_lang_switcher_hide_current','#customize-control-center_top_bar_contents','#customize-control-enable_top_bar','#customize-control-topbar_container','#customize-control-topbar_delimiter','#customize-control-topbar_visibility','#customize-control-topbar_divider_1','#customize-control-topbar_elements_title','#customize-control-topbar_components_left','#customize-control-topbar_components_right','#customize-control-topbar_divider_2','#customize-control-topbar_contact_info_title','#customize-control-topbar_contact_mail','#customize-control-topbar_contact_phone','#customize-control-topbar_divider_3','#customize-control-topbar_social_title','#customize-control-social_profiles_topbar','#customize-control-topbar_divider_4','#customize-control-topbar_text_title','#customize-control-topbar_text','#customize-control-topbar_divider_5','#customize-control-topbar_nav_title','#customize-control-topbar_nav_link', ) ), 'controls_design' => json_encode( array( '#customize-control-topbar_divider_7','#customize-control-topbar_background','#customize-control-topbar_color','#customize-control-topbar_divider_6','#customize-control-topbar_padding','#customize-control-topbar_divider_size','#customize-control-topbar_divider_color','#customize-control-topbar_divider_width' ) ), ) ) ); $wp_customize->add_setting( 'enable_top_bar', array( 'default' => 0, 'sanitize_callback' => 'sydney_sanitize_checkbox', ) ); $wp_customize->add_control( new Sydney_Toggle_Control( $wp_customize, 'enable_top_bar', array( 'label' => esc_html__( 'Enable top bar', 'sydney' ), 'section' => 'sydney_section_top_bar', ) ) ); $wp_customize->add_setting( 'topbar_container', array( 'default' => 'container', 'sanitize_callback' => 'sydney_sanitize_text' ) ); $wp_customize->add_control( new Sydney_Radio_Buttons( $wp_customize, 'topbar_container', array( 'label' => esc_html__( 'Container type', 'sydney' ), 'section' => 'sydney_section_top_bar', 'choices' => array( 'container' => esc_html__( 'Contained', 'sydney' ), 'container-fluid' => esc_html__( 'Fullwidth', 'sydney' ), ) ) ) ); $wp_customize->add_setting( 'topbar_delimiter', array( 'default' => 'none', 'sanitize_callback' => 'sydney_sanitize_text' ) ); $wp_customize->add_control( new Sydney_Radio_Buttons( $wp_customize, 'topbar_delimiter', array( 'label' => esc_html__( 'Delimiter style', 'sydney' ), 'section' => 'sydney_section_top_bar', 'choices' => array( 'none' => esc_html__( 'None', 'sydney' ), 'dot' => '·', 'vertical' => '|', 'horizontal'=> '⎯' ), ) ) ); $wp_customize->add_setting( 'topbar_visibility', array( 'sanitize_callback' => 'sydney_sanitize_select', 'default' => 'desktop-only', ) ); $wp_customize->add_control( 'topbar_visibility', array( 'type' => 'select', 'section' => 'sydney_section_top_bar', 'label' => esc_html__( 'Visibility', 'sydney' ), 'choices' => array( 'all' => esc_html__( 'Show on all devices', 'sydney' ), 'desktop-only' => esc_html__( 'Desktop only', 'sydney' ), 'mobile-only' => esc_html__( 'Mobile/tablet only', 'sydney' ), ), ) ); $wp_customize->add_setting( 'topbar_divider_1', array( 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Divider_Control( $wp_customize, 'topbar_divider_1', array( 'section' => 'sydney_section_top_bar', ) ) ); $wp_customize->add_setting( 'topbar_elements_title', array( 'default' => '', 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Text_Control( $wp_customize, 'topbar_elements_title', array( 'label' => esc_html__( 'Elements', 'sydney' ), 'section' => 'sydney_section_top_bar', ) ) ); $sydney_topbar_components = sydney_topbar_elements(); $sydney_default_components = sydney_get_default_topbar_components(); //Left $wp_customize->add_setting( 'topbar_components_left', array( 'default' => $sydney_default_components['left'], 'sanitize_callback' => 'sydney_sanitize_topbar_components' ) ); $wp_customize->add_control( new \Kirki\Control\Sortable( $wp_customize, 'topbar_components_left', array( 'label' => esc_html__( 'Left side', 'sydney' ), 'section' => 'sydney_section_top_bar', 'choices' => $sydney_topbar_components, ) ) ); //Right $wp_customize->add_setting( 'topbar_components_right', array( 'default' => $sydney_default_components['right'], 'sanitize_callback' => 'sydney_sanitize_topbar_components' ) ); $wp_customize->add_control( new \Kirki\Control\Sortable( $wp_customize, 'topbar_components_right', array( 'label' => esc_html__( 'Right side', 'sydney' ), 'section' => 'sydney_section_top_bar', 'choices' => $sydney_topbar_components, ) ) ); $wp_customize->add_setting( 'center_top_bar_contents', array( 'default' => 0, 'sanitize_callback' => 'sydney_sanitize_checkbox', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new Sydney_Toggle_Control( $wp_customize, 'center_top_bar_contents', array( 'label' => esc_html__( 'Center the content?', 'sydney' ), 'section' => 'sydney_section_top_bar', 'active_callback' => 'sydney_callback_topbar_center_contents' ) ) ); //Contact info $wp_customize->add_setting( 'topbar_divider_2', array( 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Divider_Control( $wp_customize, 'topbar_divider_2', array( 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'contact_info' ); } ) ) ); $wp_customize->add_setting( 'topbar_contact_info_title', array( 'default' => '', 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Text_Control( $wp_customize, 'topbar_contact_info_title', array( 'label' => esc_html__( 'Contact info', 'sydney' ), 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'contact_info' ); } ) ) ); $wp_customize->add_setting( 'topbar_contact_mail', array( 'sanitize_callback' => 'sydney_sanitize_text', 'default' => esc_html__( 'office@example.org', 'sydney' ), ) ); $wp_customize->add_control( 'topbar_contact_mail', array( 'label' => esc_html__( 'Email address', 'sydney' ), 'type' => 'text', 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'contact_info' ); } ) ); $wp_customize->add_setting( 'topbar_contact_phone', array( 'sanitize_callback' => 'sydney_sanitize_text', 'default' => esc_html__( '111222333', 'sydney' ), ) ); $wp_customize->add_control( 'topbar_contact_phone', array( 'label' => esc_html__( 'Phone number', 'sydney' ), 'type' => 'text', 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'contact_info' ); } ) ); //Social $wp_customize->add_setting( 'topbar_divider_3', array( 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Divider_Control( $wp_customize, 'topbar_divider_3', array( 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'social' ); } ) ) ); $wp_customize->add_setting( 'topbar_social_title', array( 'default' => '', 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Text_Control( $wp_customize, 'topbar_social_title', array( 'label' => esc_html__( 'Social', 'sydney' ), 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'social' ); } ) ) ); $wp_customize->add_setting( 'social_profiles_topbar', array( 'default' => '', 'sanitize_callback' => 'sydney_sanitize_urls' ) ); $wp_customize->add_control( new Sydney_Repeater_Control( $wp_customize, 'social_profiles_topbar', array( 'label' => esc_html__( 'Social profile', 'sydney' ), 'section' => 'sydney_section_top_bar', 'button_labels' => array( 'add' => esc_html__( 'Add new', 'sydney' ), ), 'active_callback' => function() { return sydney_callback_topbar_elements( 'social' ); } ) ) ); //text $wp_customize->add_setting( 'topbar_divider_4', array( 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Divider_Control( $wp_customize, 'topbar_divider_4', array( 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'text' ); } ) ) ); $wp_customize->add_setting( 'topbar_text_title', array( 'default' => '', 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Text_Control( $wp_customize, 'topbar_text_title', array( 'label' => esc_html__( 'Text', 'sydney' ), 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'text' ); } ) ) ); $wp_customize->add_setting( 'topbar_text', array( 'sanitize_callback' => 'sydney_sanitize_text', 'default' => esc_html__( 'Your text here', 'sydney' ), ) ); $wp_customize->add_control( 'topbar_text', array( 'label' => '', 'type' => 'text', 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'text' ); } ) ); //nav $wp_customize->add_setting( 'topbar_divider_5', array( 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Divider_Control( $wp_customize, 'topbar_divider_5', array( 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'secondary_nav' ); } ) ) ); $wp_customize->add_setting( 'topbar_nav_title', array( 'default' => '', 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Text_Control( $wp_customize, 'topbar_nav_title', array( 'label' => esc_html__( 'Secondary menu', 'sydney' ), 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'secondary_nav' ); } ) ) ); $wp_customize->add_setting( 'topbar_nav_link', array( 'default' => '', 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Text_Control( $wp_customize, 'topbar_nav_link', array( 'description' => '<a class="footer-widget-area-link footer-widget-area-link-1" href="javascript:wp.customize.panel( \'nav_menus\' ).focus();">' . esc_html__( 'Configure menu', 'sydney' ) . '<span class="dashicons dashicons-arrow-right-alt2"></span></a>', 'section' => 'sydney_section_top_bar', 'active_callback' => function() { return sydney_callback_topbar_elements( 'secondary_nav' ); } ) ) ); /** * Styling */ $wp_customize->add_setting( 'topbar_background', array( 'default' => '#00102E', 'sanitize_callback' => 'sydney_sanitize_hex_rgba', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new Sydney_Alpha_Color( $wp_customize, 'topbar_background', array( 'label' => esc_html__( 'Background color', 'sydney' ), 'section' => 'sydney_section_top_bar', ) ) ); $wp_customize->add_setting( 'topbar_color', array( 'default' => '#fff', 'sanitize_callback' => 'sydney_sanitize_hex_rgba', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new Sydney_Alpha_Color( $wp_customize, 'topbar_color', array( 'label' => esc_html__( 'Text color', 'sydney' ), 'section' => 'sydney_section_top_bar', ) ) ); $wp_customize->add_setting( 'topbar_divider_6', array( 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Divider_Control( $wp_customize, 'topbar_divider_6', array( 'section' => 'sydney_section_top_bar', ) ) ); $wp_customize->add_setting( 'topbar_padding', array( 'default' => 15, 'transport' => 'postMessage', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new Sydney_Responsive_Slider( $wp_customize, 'topbar_padding', array( 'label' => esc_html__( 'Top & bottom padding', 'sydney' ), 'section' => 'sydney_section_top_bar', 'is_responsive' => 0, 'settings' => array ( 'size_desktop' => 'topbar_padding', ), 'input_attrs' => array ( 'min' => 0, 'max' => 100 ) ) ) ); $wp_customize->add_setting( 'topbar_divider_7', array( 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Sydney_Divider_Control( $wp_customize, 'topbar_divider_7', array( 'section' => 'sydney_section_top_bar', ) ) ); $wp_customize->add_setting( 'topbar_divider_size', array( 'sanitize_callback' => 'absint', 'default' => 1, 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'topbar_divider_size', array( 'type' => 'number', 'section' => 'sydney_section_top_bar', 'label' => esc_html__( 'Border size', 'sydney' ), ) ); $wp_customize->add_setting( 'topbar_divider_color', array( 'default' => 'rgba(255,255,255,0.1)', 'sanitize_callback' => 'sydney_sanitize_hex_rgba', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new Sydney_Alpha_Color( $wp_customize, 'topbar_divider_color', array( 'label' => esc_html__( 'Border color', 'sydney' ), 'section' => 'sydney_section_top_bar', ) ) ); $wp_customize->add_setting( 'topbar_divider_width', array( 'default' => 'fullwidth', 'sanitize_callback' => 'sydney_sanitize_text' ) ); $wp_customize->add_control( new Sydney_Radio_Buttons( $wp_customize, 'topbar_divider_width', array( 'label' => esc_html__( 'Border width', 'sydney' ), 'section' => 'sydney_section_top_bar', 'choices' => array( 'contained' => esc_html__( 'Contained', 'sydney' ), 'fullwidth' => esc_html__( 'Fullwidth', 'sydney' ), ), ) ) );
[+]
..
[+]
modules
[-] blog-single.php
[edit]
[-] blog.php
[edit]
[-] colors.php
[edit]
[-] cpt-panels.php
[edit]
[-] footer.php
[edit]
[-] general.php
[edit]
[-] header-mobile.php
[edit]
[-] header.php
[edit]
[-] hero-area.php
[edit]
[-] layouts.php
[edit]
[-] performance.php
[edit]
[-] topbar.php
[edit]
[-] typography.php
[edit]
[-] woocommerce-single.php
[edit]
[-] woocommerce.php
[edit]
[-] .htaccess.disabled
[edit]