556 lines
18 KiB
PHP
556 lines
18 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
global $wp_registered_sidebars;
|
||
|
|
$sidebars = array();
|
||
|
|
if ( ! empty( $wp_registered_sidebars ) ) :
|
||
|
|
foreach ( $wp_registered_sidebars as $sidebar ) :
|
||
|
|
$sidebars[$sidebar['id']] = $sidebar['name'];
|
||
|
|
endforeach;
|
||
|
|
endif;
|
||
|
|
|
||
|
|
/*----------------------------
|
||
|
|
Blog page
|
||
|
|
----------------------------*/
|
||
|
|
Kirki::add_section( 'upstudy_blog_page_section', array(
|
||
|
|
'title' => esc_html__( 'Blog Page', 'upstudy' ),
|
||
|
|
'panel' => 'header_blog_panel',
|
||
|
|
) );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'select',
|
||
|
|
'settings' => 'blog_post_style',
|
||
|
|
'label' => esc_html__( 'Blog Style', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => 'standard',
|
||
|
|
'choices' => [
|
||
|
|
'standard' => esc_html__( 'Standard', 'upstudy' ),
|
||
|
|
'1' => esc_html__( 'Style 01', 'upstudy' ),
|
||
|
|
'2' => esc_html__( 'Style 02', 'upstudy' ),
|
||
|
|
'3' => esc_html__( 'Style 03', 'upstudy' ),
|
||
|
|
],
|
||
|
|
|
||
|
|
] );
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'radio-buttonset',
|
||
|
|
'settings' => 'blog_post_columns',
|
||
|
|
'label' => esc_html__( 'Blog Columns', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => '2',
|
||
|
|
'choices' => [
|
||
|
|
'1' => esc_html__('1', 'upstudy'),
|
||
|
|
'2' => esc_html__('2', 'upstudy'),
|
||
|
|
'3' => esc_html__('3', 'upstudy'),
|
||
|
|
'4' => esc_html__('4', 'upstudy'),
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'select',
|
||
|
|
'settings' => 'blog_archive_sidebar_name',
|
||
|
|
'label' => esc_html__( 'Select Sidebar', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => 'sidebar-1',
|
||
|
|
'choices' => $sidebars
|
||
|
|
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'radio-buttonset',
|
||
|
|
'settings' => 'blog_sidebar',
|
||
|
|
'label' => esc_html__( 'Sidebar', 'upstudy' ),
|
||
|
|
'description' => esc_html__( 'Select your sidebar position', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => 'right-sidebar',
|
||
|
|
'choices' => [
|
||
|
|
'left-sidebar' => esc_html__( 'Left', 'upstudy' ),
|
||
|
|
'no-sidebar' => esc_html__( 'No Sidebar', 'upstudy' ),
|
||
|
|
'right-sidebar' => esc_html__( 'Right', 'upstudy' ),
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Sidebar Width
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'select',
|
||
|
|
'settings' => 'blog_sidebar_width',
|
||
|
|
'label' => esc_html__( 'Sidebar Width', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => '3',
|
||
|
|
'choices' => [
|
||
|
|
'3' => esc_html__('25%', 'upstudy'),
|
||
|
|
'4' => esc_html__('33%', 'upstudy'),
|
||
|
|
],
|
||
|
|
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_excerpt_show',
|
||
|
|
'label' => esc_html__( 'Excerpt?', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => true,
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'number',
|
||
|
|
'settings' => 'blog_excerpt_length',
|
||
|
|
'label' => esc_html__( 'Excerpt Length', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => 18,
|
||
|
|
'choices' => [
|
||
|
|
'min' => -1,
|
||
|
|
'step' => 1,
|
||
|
|
'max' => 250
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
// divider before upstudy_theme_config
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'custom',
|
||
|
|
'settings' => 'divider_before_blog_sidebar_sticky',
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => '<hr>',
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Sidebar Sticky
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_masonry_show',
|
||
|
|
'label' => esc_html__( 'Masonry Layout?', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => false,
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Sidebar Sticky
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_sidebar_sticky',
|
||
|
|
'label' => esc_html__( 'Sidebar Sticky?', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Author
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_author_show',
|
||
|
|
'label' => esc_html__( 'Author?', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
|
||
|
|
// Date
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_date_show',
|
||
|
|
'label' => esc_html__( 'Date?', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Category
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_category_show',
|
||
|
|
'label' => esc_html__( 'Category', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_read_more_btn_show',
|
||
|
|
'label' => esc_html__( 'Read More Button?', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'text',
|
||
|
|
'label' => esc_html__('Custom - Read More', 'upstudy'),
|
||
|
|
'settings' => 'blog_button_text',
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => esc_html('Read More'),
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_read_more_btn_show',
|
||
|
|
'operator' => '===',
|
||
|
|
'value' => true,
|
||
|
|
],
|
||
|
|
]
|
||
|
|
] );
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_comment_show',
|
||
|
|
'label' => esc_html__( 'Comment', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => '0',
|
||
|
|
] );
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'text',
|
||
|
|
'label' => esc_html__('Custom - Comments', 'upstudy'),
|
||
|
|
'settings' => 'blog_comments_text',
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => esc_html('Comments'),
|
||
|
|
] );
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'text',
|
||
|
|
'label' => esc_html__('Custom - Comment', 'upstudy'),
|
||
|
|
'settings' => 'blog_comment_short_text',
|
||
|
|
'section' => 'upstudy_blog_page_section',
|
||
|
|
'default' => esc_html('Comment'),
|
||
|
|
] );
|
||
|
|
/*----------------------------
|
||
|
|
Single Page
|
||
|
|
----------------------------*/
|
||
|
|
Kirki::add_section( 'upstudy_blog_single_section', array(
|
||
|
|
'title' => esc_html__( 'Single Page', 'upstudy' ),
|
||
|
|
'panel' => 'header_blog_panel',
|
||
|
|
) );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'select',
|
||
|
|
'settings' => 'blog_single_layout',
|
||
|
|
'label' => esc_html__( 'Blog Single Style', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => 'blog_layout_overlay',
|
||
|
|
'choices' => [
|
||
|
|
'blog_layout_overlay' => esc_html__( 'Image Overlay', 'upstudy' ),
|
||
|
|
'blog_layout_title_first' => esc_html__( 'Title First', 'upstudy' ),
|
||
|
|
'blog_layout_image_first' => esc_html__( 'Image First', 'upstudy' ),
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'radio-buttonset',
|
||
|
|
'settings' => 'blog_single_page_title_text',
|
||
|
|
'label' => esc_html__( 'Page Title Text', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => 'post-title',
|
||
|
|
'choices' => [
|
||
|
|
'post-type-name' => esc_html__( 'Post Type Name', 'upstudy' ),
|
||
|
|
'post-title' => esc_html__( 'Post Title', 'upstudy' ),
|
||
|
|
],
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_single_layout',
|
||
|
|
'operator' => '!==',
|
||
|
|
'value' => 'blog_layout_overlay',
|
||
|
|
],
|
||
|
|
]
|
||
|
|
] );
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'select',
|
||
|
|
'settings' => 'blog_single_sidebar_name',
|
||
|
|
'label' => esc_html__( 'Select Sidebar', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => 'sidebar-1',
|
||
|
|
'choices' => $sidebars
|
||
|
|
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'radio-buttonset',
|
||
|
|
'settings' => 'blog_single_sidebar',
|
||
|
|
'label' => esc_html__( 'Sidebar', 'upstudy' ),
|
||
|
|
'description' => esc_html__( 'Select your sidebar position', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => 'right-sidebar',
|
||
|
|
'choices' => [
|
||
|
|
'left-sidebar' => esc_html__( 'Left', 'upstudy' ),
|
||
|
|
'no-sidebar' => esc_html__( 'No Sidebar', 'upstudy' ),
|
||
|
|
'right-sidebar' => esc_html__( 'Right', 'upstudy' ),
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Sidebar Width
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'select',
|
||
|
|
'settings' => 'blog_single_sidebar_width',
|
||
|
|
'label' => esc_html__( 'Sidebar Width', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '3',
|
||
|
|
'choices' => [
|
||
|
|
'3' => esc_html__('25%', 'upstudy'),
|
||
|
|
'4' => esc_html__('33%', 'upstudy'),
|
||
|
|
],
|
||
|
|
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_single_sidebar_sticky',
|
||
|
|
'label' => esc_html__( 'Sidebar Sticky', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_single_img_overlay_shape',
|
||
|
|
'label' => esc_html__( 'Image Overlay Shape', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '1',
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_single_layout',
|
||
|
|
'operator' => '===',
|
||
|
|
'value' => 'blog_layout_overlay',
|
||
|
|
],
|
||
|
|
]
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_single_author_show',
|
||
|
|
'label' => esc_html__( 'Author', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Author Bio
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_single_author_bio_show',
|
||
|
|
'label' => esc_html__( 'Author Bio', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Date
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_single_date_show',
|
||
|
|
'label' => esc_html__( 'Date', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Category
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_single_category_show',
|
||
|
|
'label' => esc_html__( 'Category', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '0',
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_single_comment_show',
|
||
|
|
'label' => esc_html__( 'Comment', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_single_like_show',
|
||
|
|
'label' => esc_html__( 'Likes', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Tags
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_single_tags_show',
|
||
|
|
'label' => esc_html__( 'Tags', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Social Share
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_single_social_share',
|
||
|
|
'label' => esc_html__( 'Social Share', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
// Post Navigation
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_nav_show',
|
||
|
|
'label' => esc_html__( 'Post Navigation', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_single_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
/*----------------------------
|
||
|
|
Related Post
|
||
|
|
----------------------------*/
|
||
|
|
Kirki::add_section( 'upstudy_blog_related_section', array(
|
||
|
|
'title' => esc_html__( 'Related Post', 'upstudy' ),
|
||
|
|
'panel' => 'header_blog_panel',
|
||
|
|
) );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'blog_related_show',
|
||
|
|
'label' => esc_html__( 'Related Post', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_related_section',
|
||
|
|
'default' => '1',
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'text',
|
||
|
|
'label' => esc_html__('Related Posts', 'upstudy'),
|
||
|
|
'settings' => 'blog_related_title',
|
||
|
|
'section' => 'upstudy_blog_related_section',
|
||
|
|
'default' => esc_html('Related Posts'),
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_related_show',
|
||
|
|
'operator' => '===',
|
||
|
|
'value' => true,
|
||
|
|
],
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'number',
|
||
|
|
'settings' => 'related_total_posts',
|
||
|
|
'label' => esc_html__( 'Number of Related Post', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_related_section',
|
||
|
|
'default' => 3,
|
||
|
|
'choices' => [
|
||
|
|
'min' => 0,
|
||
|
|
'max' => 10,
|
||
|
|
'step' => 1,
|
||
|
|
],
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_related_show',
|
||
|
|
'operator' => '===',
|
||
|
|
'value' => true,
|
||
|
|
],
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'radio-buttonset',
|
||
|
|
'settings' => 'related_post_columns',
|
||
|
|
'label' => esc_html__( 'Related Posts Columns', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_related_section',
|
||
|
|
'default' => '4',
|
||
|
|
'choices' => [
|
||
|
|
'12' => esc_html__('1', 'upstudy'),
|
||
|
|
'6' => esc_html__('2', 'upstudy'),
|
||
|
|
'4' => esc_html__('3', 'upstudy'),
|
||
|
|
'3' => esc_html__('4', 'upstudy'),
|
||
|
|
],
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_related_show',
|
||
|
|
'operator' => '===',
|
||
|
|
'value' => true,
|
||
|
|
],
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'radio-buttonset',
|
||
|
|
'settings' => 'related_posts_by',
|
||
|
|
'label' => esc_html__( 'Related Posts Query By', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_related_section',
|
||
|
|
'default' => 'tags',
|
||
|
|
'choices' => [
|
||
|
|
'category' => esc_html__('Category', 'upstudy'),
|
||
|
|
'tags' => esc_html__('Tags', 'upstudy'),
|
||
|
|
],
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_related_show',
|
||
|
|
'operator' => '===',
|
||
|
|
'value' => true,
|
||
|
|
],
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'related_excerpt_show',
|
||
|
|
'label' => esc_html__( 'Excerpt?', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_related_section',
|
||
|
|
'default' => false,
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_related_show',
|
||
|
|
'operator' => '===',
|
||
|
|
'value' => true,
|
||
|
|
],
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'number',
|
||
|
|
'settings' => 'related_excerpt_length',
|
||
|
|
'label' => esc_html__( 'Excerpt Length', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_related_section',
|
||
|
|
'default' => 18,
|
||
|
|
'choices' => [
|
||
|
|
'min' => -1,
|
||
|
|
'step' => 1,
|
||
|
|
'max' => 250
|
||
|
|
],
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_related_show',
|
||
|
|
'operator' => '===',
|
||
|
|
'value' => true,
|
||
|
|
],
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'related_author_show',
|
||
|
|
'label' => esc_html__( 'Author?', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_related_section',
|
||
|
|
'default' => false,
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_related_show',
|
||
|
|
'operator' => '===',
|
||
|
|
'value' => true,
|
||
|
|
],
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'related_date_show',
|
||
|
|
'label' => esc_html__( 'Date?', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_related_section',
|
||
|
|
'default' => '1',
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_related_show',
|
||
|
|
'operator' => '===',
|
||
|
|
'value' => true,
|
||
|
|
],
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'related_category_show',
|
||
|
|
'label' => esc_html__( 'Category', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_related_section',
|
||
|
|
'default' => true,
|
||
|
|
'active_callback' => [
|
||
|
|
[
|
||
|
|
'setting' => 'blog_related_show',
|
||
|
|
'operator' => '===',
|
||
|
|
'value' => true,
|
||
|
|
],
|
||
|
|
],
|
||
|
|
] );
|
||
|
|
|
||
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
||
|
|
'type' => 'toggle',
|
||
|
|
'settings' => 'related_comment_show',
|
||
|
|
'label' => esc_html__( 'Comment', 'upstudy' ),
|
||
|
|
'section' => 'upstudy_blog_related_section',
|
||
|
|
'default' => false,
|
||
|
|
] );
|