127 lines
3.9 KiB
PHP
127 lines
3.9 KiB
PHP
<?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',
|
|
)
|
|
); |