Yuzu Theme
from meowapps.com
This commit is contained in:
402
inc/customizer-sections/colors-section.php
Normal file
402
inc/customizer-sections/colors-section.php
Normal file
@@ -0,0 +1,402 @@
|
||||
<?php
|
||||
function create_color_control( $args, $wp_customize ) {
|
||||
|
||||
$wp_customize->add_setting(
|
||||
$args['setting'], array(
|
||||
'default' => $args['default'],
|
||||
'transport' => 'refresh'
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
new WP_Customize_Color_Control(
|
||||
$wp_customize,
|
||||
$args['setting'],
|
||||
array(
|
||||
'label' => $args['label'],
|
||||
'description' => $args['description'],
|
||||
'section' => $args['section'],
|
||||
'settings' => $args['setting'],
|
||||
'active_callback' => $args['active_callback']
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/* =============================================== */
|
||||
// # COLORS SECTION
|
||||
/* =============================================== */
|
||||
$wp_customize->add_section( 'colors_section', array(
|
||||
'priority' => 10,
|
||||
'capability' => 'edit_theme_options',
|
||||
'theme_supports' => '',
|
||||
'title' => __( 'Colors', 'yuzu' ),
|
||||
'description' => '',
|
||||
'panel' => 'theme_settings',
|
||||
) );
|
||||
|
||||
|
||||
/* =============================================== */
|
||||
// ## Scheme
|
||||
/* =============================================== */
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-color-sheme-accordion',
|
||||
array(
|
||||
'section' => 'colors_section',
|
||||
'label' => __( 'Color Scheme', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting( 'color_scheme', array(
|
||||
'default' => 'light',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
) );
|
||||
$wp_customize->add_control(
|
||||
'color_scheme',
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => __('Color Scheme', 'yuzu'),
|
||||
'section' => 'colors_section',
|
||||
'choices' => array(
|
||||
'light' => __('Light Theme (default)', 'yuzu'),
|
||||
'dark' => __('Dark Theme', 'yuzu'),
|
||||
'custom' => __('Custom Theme', 'yuzu'),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
function is_custom_scheme_callback( $control ) {
|
||||
if ( $control->manager->get_setting('color_scheme')->value() == 'custom' ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* =============================================== */
|
||||
// ## Backgrounds
|
||||
/* =============================================== */
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-backgrounds-colors-accordion',
|
||||
array(
|
||||
'section' => 'colors_section',
|
||||
'label' => __( 'Backgrounds', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting( 'bg_not_editable_notice',
|
||||
array(
|
||||
'default' => '',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'skyrocket_text_sanitization'
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control( new Skyrocket_Simple_Notice_Custom_control( $wp_customize, 'bg_not_editable_notice',
|
||||
array(
|
||||
'label' => __( 'Unavailable', 'yuzu' ),
|
||||
'description' => __('Please select "Custom Scheme" in order to be able to edit colors individually.', 'yuzu' ),
|
||||
'section' => 'colors_section',
|
||||
'active_callback' => function(){
|
||||
if(get_theme_mod( 'color_scheme', 'light' ) != 'custom')
|
||||
return true;
|
||||
}
|
||||
)
|
||||
) );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'top_bar_bg',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Top Bar Background',
|
||||
'description' => '',
|
||||
'default' => '#FFF',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'body_bg',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Body Background',
|
||||
'description' => '',
|
||||
'default' => '#FAFBFB',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'footer_bg',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Footer Background',
|
||||
'description' => '',
|
||||
'default' => '#F6F7FB',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'card_bg',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Cards Background',
|
||||
'description' => '',
|
||||
'default' => '#F6F7FB',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'search_widget_bg',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Search Field Background',
|
||||
'description' => '',
|
||||
'default' => '#f5f4f4',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'comment_bg',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Comment Background',
|
||||
'description' => '',
|
||||
'default' => '#F6F7FB',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'comment_form_bg',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Comment Form Background',
|
||||
'description' => '',
|
||||
'default' => '#F6F7FB',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
/* =============================================== */
|
||||
// ## Texts
|
||||
/* =============================================== */
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-text-colors-accordion',
|
||||
array(
|
||||
'section' => 'colors_section',
|
||||
'label' => __( 'Font Colors', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting( 'color_not_editable_notice',
|
||||
array(
|
||||
'default' => '',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'skyrocket_text_sanitization'
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control( new Skyrocket_Simple_Notice_Custom_control( $wp_customize, 'color_not_editable_notice',
|
||||
array(
|
||||
'label' => __( 'Unavailable', 'yuzu' ),
|
||||
'description' => __('Please select "Custom Scheme" in order to be able to edit colors individually.', 'yuzu' ),
|
||||
'section' => 'colors_section',
|
||||
'active_callback' => function(){
|
||||
if(get_theme_mod( 'color_scheme', 'light' ) != 'custom')
|
||||
return true;
|
||||
}
|
||||
)
|
||||
) );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'link_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Link Color',
|
||||
'description' => '',
|
||||
'default' => '#4B828E',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'link_hover_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Hovered Link Color',
|
||||
'description' => '',
|
||||
'default' => '#39636D',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'top_bar_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Top Bar Color',
|
||||
'description' => '',
|
||||
'default' => '#2E3B4F',
|
||||
'active_callback' => 'is_custom_scheme_callback',
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'body_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Body Color',
|
||||
'description' => '',
|
||||
'default' => '#2E3B4F',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'footer_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Footer Color',
|
||||
'description' => '',
|
||||
'default' => '#2E3B4F',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'card_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Cards Color',
|
||||
'description' => '',
|
||||
'default' => '#2E3B4F',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'search_widget_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Search Field Color',
|
||||
'description' => '',
|
||||
'default' => '#2E3B4F',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'comment_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Comment Color',
|
||||
'description' => '',
|
||||
'default' => '#2E3B4F',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'comment_form_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Comment Form Color',
|
||||
'description' => '',
|
||||
'default' => '#2E3B4F',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
/* =============================================== */
|
||||
// ## Others
|
||||
/* =============================================== */
|
||||
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-other-colors-accordion',
|
||||
array(
|
||||
'section' => 'colors_section',
|
||||
'label' => __( 'Others', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting( 'other_not_editable_notice',
|
||||
array(
|
||||
'default' => '',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'skyrocket_text_sanitization'
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control( new Skyrocket_Simple_Notice_Custom_control( $wp_customize, 'other_not_editable_notice',
|
||||
array(
|
||||
'label' => __( 'Unavailable', 'yuzu' ),
|
||||
'description' => __('Please select "Custom Scheme" in order to be able to edit colors individually.', 'yuzu' ),
|
||||
'section' => 'colors_section',
|
||||
'active_callback' => function(){
|
||||
if(get_theme_mod( 'color_scheme', 'light' ) != 'custom')
|
||||
return true;
|
||||
}
|
||||
)
|
||||
) );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'tag_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Tags Color',
|
||||
'description' => '',
|
||||
'default' => '#4B828E',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'tag_hover_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Hovered Tag Color',
|
||||
'description' => '',
|
||||
'default' => '#39636D',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'read_more_btn_bg',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Read More Button Background',
|
||||
'description' => '',
|
||||
'default' => '#F5F5F5',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'read_more_btn_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Read More Button Color',
|
||||
'description' => '',
|
||||
'default' => '#2E3B4F',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'post_comment_btn_bg',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Post Comment Button Background',
|
||||
'description' => '',
|
||||
'default' => '#F5F5F5',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
|
||||
$args = array(
|
||||
'setting' => 'post_comment_btn_color',
|
||||
'section' => 'colors_section',
|
||||
'label' => 'Post Comment Button Color',
|
||||
'description' => '',
|
||||
'default' => '#2E3B4F',
|
||||
'active_callback' => 'is_custom_scheme_callback'
|
||||
);
|
||||
create_color_control( $args, $wp_customize );
|
||||
131
inc/customizer-sections/general-section.php
Normal file
131
inc/customizer-sections/general-section.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
/* =============================================== */
|
||||
// # GENERAL SECTION
|
||||
/* =============================================== */
|
||||
$wp_customize->add_section( 'general_section', array(
|
||||
'priority' => 10,
|
||||
'capability' => 'edit_theme_options',
|
||||
'theme_supports' => '',
|
||||
'title' => __( 'General', 'yuzu' ),
|
||||
'description' => '',
|
||||
'panel' => 'theme_settings',
|
||||
) );
|
||||
|
||||
/* =============================================== */
|
||||
// ## SOCIAL NETWORKS
|
||||
/* =============================================== */
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-social-networks-accordion',
|
||||
array(
|
||||
'section' => 'general_section',
|
||||
'label' => __( 'Social Networks', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'instagram_url',
|
||||
array(
|
||||
'default' => '',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
'instagram_url',
|
||||
array(
|
||||
'label' => __('Instagram URL', 'yuzu'),
|
||||
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||
'section' => 'general_section',
|
||||
'type' => 'text'
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'facebook_url',
|
||||
array(
|
||||
'default' => '',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
'facebook_url',
|
||||
array(
|
||||
'label' => __('Facebook URL', 'yuzu'),
|
||||
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||
'section' => 'general_section',
|
||||
'type' => 'text'
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'twitter_url',
|
||||
array(
|
||||
'default' => '',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
'twitter_url',
|
||||
array(
|
||||
'label' => __('Twitter URL', 'yuzu'),
|
||||
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||
'section' => 'general_section',
|
||||
'type' => 'text'
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'flickr_url',
|
||||
array(
|
||||
'default' => '',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
'flickr_url',
|
||||
array(
|
||||
'label' => __('Flickr URL', 'yuzu'),
|
||||
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||
'section' => 'general_section',
|
||||
'type' => 'text'
|
||||
)
|
||||
);
|
||||
|
||||
/* =============================================== */
|
||||
// ## COPYRIGHT
|
||||
/* =============================================== */
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-copyright-infos-accordion',
|
||||
array(
|
||||
'section' => 'general_section',
|
||||
'label' => __( 'Copyright', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'copyright_text',
|
||||
array(
|
||||
'default' => '© Yuzu Theme 2018',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'wp_kses_post',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
'copyright_text',
|
||||
array(
|
||||
'label' => __('Copyright Text', 'yuzu'),
|
||||
'section' => 'general_section',
|
||||
'type' => 'text'
|
||||
)
|
||||
);
|
||||
127
inc/customizer-sections/layout-section.php
Normal file
127
inc/customizer-sections/layout-section.php
Normal file
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
/* =============================================== */
|
||||
// # LAYOUT SECTION
|
||||
/* =============================================== */
|
||||
$wp_customize->add_section( 'layout_section', array(
|
||||
'priority' => 10,
|
||||
'capability' => 'edit_theme_options',
|
||||
'theme_supports' => '',
|
||||
'title' => __( 'Layout', 'yuzu' ),
|
||||
'description' => '',
|
||||
'panel' => 'theme_settings',
|
||||
) );
|
||||
|
||||
/* =============================================== */
|
||||
// ## Top Bar
|
||||
/* =============================================== */
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-top-bar-layout-setting-accordion',
|
||||
array(
|
||||
'section' => 'layout_section',
|
||||
'label' => __( 'Top Bar', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting( 'enable_search_in_top_bar', array(
|
||||
'default' => true,
|
||||
'transport' => 'refresh',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control(
|
||||
'enable_search_in_top_bar',
|
||||
array(
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Enable search in the top bar.', 'yuzu'),
|
||||
'section' => 'layout_section',
|
||||
)
|
||||
);
|
||||
|
||||
/* =============================================== */
|
||||
// ## Blog
|
||||
/* =============================================== */
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-blog-layout-setting-accordion',
|
||||
array(
|
||||
'section' => 'layout_section',
|
||||
'label' => __( 'Blog', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting( 'enable_posts_height_equalizer', array(
|
||||
'default' => true,
|
||||
'transport' => 'refresh',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control(
|
||||
'enable_posts_height_equalizer',
|
||||
array(
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Equalize articles cards height.', 'yuzu'),
|
||||
'section' => 'layout_section',
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting( 'display_posts_navigation', array(
|
||||
'default' => true,
|
||||
'transport' => 'refresh',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control(
|
||||
'display_posts_navigation',
|
||||
array(
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Display previous/next articles at the bottom of articles.', 'yuzu'),
|
||||
'section' => 'layout_section',
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting( 'display_posts_meta', array(
|
||||
'default' => true,
|
||||
'transport' => 'refresh',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control(
|
||||
'display_posts_meta',
|
||||
array(
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Display article metadata.', 'yuzu'),
|
||||
'section' => 'layout_section',
|
||||
)
|
||||
);
|
||||
|
||||
/* =============================================== */
|
||||
// ## Other
|
||||
/* =============================================== */
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-other-layout-setting-accordion',
|
||||
array(
|
||||
'section' => 'layout_section',
|
||||
'label' => __( 'Others', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting( 'enable_scroll_back_to_top_btn', array(
|
||||
'default' => true,
|
||||
'transport' => 'refresh',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control(
|
||||
'enable_scroll_back_to_top_btn',
|
||||
array(
|
||||
'type' => 'checkbox',
|
||||
'label' => __('Display a button to scroll back to top of the page.', 'yuzu'),
|
||||
'section' => 'layout_section',
|
||||
)
|
||||
);
|
||||
46
inc/customizer-sections/style-section.php
Normal file
46
inc/customizer-sections/style-section.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/* =============================================== */
|
||||
// # STYLE SECTION
|
||||
/* =============================================== */
|
||||
$wp_customize->add_section( 'style_section', array(
|
||||
'priority' => 10,
|
||||
'capability' => 'edit_theme_options',
|
||||
'theme_supports' => '',
|
||||
'title' => __( 'Style', 'yuzu' ),
|
||||
'description' => '',
|
||||
'panel' => 'theme_settings',
|
||||
) );
|
||||
|
||||
/* =============================================== */
|
||||
// ## Headers
|
||||
/* =============================================== */
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-headers-style-sheme-accordion',
|
||||
array(
|
||||
'section' => 'style_section',
|
||||
'label' => __( 'Headers', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting( 'header_background_opacity', array(
|
||||
'default' => 'normal-opaque',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
) );
|
||||
$wp_customize->add_control(
|
||||
'header_background_opacity',
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => __('Header Background Opacity', 'yuzu'),
|
||||
'section' => 'style_section',
|
||||
'choices' => array(
|
||||
'less-opaque' => __('Less opaque', 'yuzu'),
|
||||
'normal-opaque' => __('Normal', 'yuzu'),
|
||||
'very-opaque' => __('Very opaque', 'yuzu'),
|
||||
)
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user