924 lines
30 KiB
PHP
924 lines
30 KiB
PHP
<?php
|
|
/*----------------------------
|
|
LearnDash Archive Page
|
|
----------------------------*/
|
|
Kirki::add_section( 'upstudy_ld_archive_page_section', array(
|
|
'title' => esc_html__( 'Course Archive Page', 'upstudy' ),
|
|
'panel' => 'upstudy_ld_panel'
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'text',
|
|
'settings' => 'ld_archive_page_title',
|
|
'label' => esc_html__( 'Custom Archive Page Title', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => esc_html__('Courses', 'upstudy'),
|
|
'transport' => 'refresh',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_ld_course_archive_style',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'select',
|
|
'settings' => 'ld_course_archive_style',
|
|
'label' => esc_html__( 'Course Style', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'multiple' => false,
|
|
'default' => '1',
|
|
'choices' => [
|
|
'1' => esc_html__('Style 01', 'upstudy'),
|
|
'2' => esc_html__('Style 02', 'upstudy'),
|
|
'3' => esc_html__('Style 03', 'upstudy'),
|
|
'4' => esc_html__('Style 04', 'upstudy'),
|
|
'5' => esc_html__('Style 05', 'upstudy'),
|
|
'6' => esc_html__('Style 06', 'upstudy'),
|
|
'7' => esc_html__('Style 07', 'upstudy'),
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_ld_course_per_page',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'number',
|
|
'settings' => 'ld_course_per_page',
|
|
'label' => esc_html__( 'Course Count', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => 6,
|
|
'choices' => [
|
|
'min' => 1,
|
|
'step' => 1,
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'radio-buttonset',
|
|
'settings' => 'ld_course_archive_clm',
|
|
'label' => esc_html__( 'Courses Columns', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '4',
|
|
'choices' => [
|
|
'6' => esc_html__('2', 'upstudy'),
|
|
'4' => esc_html__('3', 'upstudy'),
|
|
'3' => esc_html__('4', 'upstudy'),
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_course_masonry',
|
|
'label' => esc_html__( 'Masonry Layout?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => false,
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_ld_intor_video',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_archive_media_show',
|
|
'label' => esc_html__( 'Media?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
] );
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_intor_video',
|
|
'label' => esc_html__( 'PopUp Intro Video?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => false,
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'select',
|
|
'settings' => 'ld_archive_image_size',
|
|
'label' => esc_html__( 'Select Image Size', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => 'upstudy-post-thumb',
|
|
'multiple' => false,
|
|
'placeholder' => esc_html__( 'Select a image size', 'upstudy' ),
|
|
'choices' => upstudy_get_thumbnail_sizes(),
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_archive_title_show',
|
|
'label' => esc_html__( 'Title?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_excerpt_show',
|
|
'label' => esc_html__( 'Excerpt?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => false,
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_price_show',
|
|
'label' => esc_html__( 'Price?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_enroll_show',
|
|
'label' => esc_html__( 'Enrolled Students?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => false,
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_enroll_text_show',
|
|
'label' => esc_html__( 'Enrolled Students Text?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_enroll_show',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_lesson_show',
|
|
'label' => esc_html__( 'Lesson?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '0',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_lesson_text_show',
|
|
'label' => esc_html__( 'Lesson Text?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_lesson_show',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_topic_show',
|
|
'label' => esc_html__( 'Topics?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_topic_text_show',
|
|
'label' => esc_html__( 'Topics Text?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_topic_show',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_quiz_show',
|
|
'label' => esc_html__( 'Quiz?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => false,
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_quiz_text_show',
|
|
'label' => esc_html__( 'Quiz Text?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_quiz_show',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_cat_show',
|
|
'label' => esc_html__( 'Categories?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_review_show',
|
|
'label' => esc_html__( 'Review?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_review_text_show',
|
|
'label' => esc_html__( 'Review Text?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => false,
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_review_show',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_instructor_img_on_off',
|
|
'label' => esc_html__( 'Instructor Avatar?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_instructor_name_on_off',
|
|
'label' => esc_html__( 'Instructor Name?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_wishlist_show',
|
|
'label' => esc_html__( 'Wishlist?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '0',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_level_show',
|
|
'label' => esc_html__( 'Course Level?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '0',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_see_more_btn',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_see_more_btn',
|
|
'label' => esc_html__( 'See More Button?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'See More - Custom Text', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'ld_see_more_btn_text',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '',
|
|
'transport' => 'postMessage',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'see_more_btn',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_custom_closed_btn_url',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'custom_closed_btn_url',
|
|
'label' => esc_html__( 'Custom Closed Button URL?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Free - Custom Text', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'free_custom_text',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '',
|
|
'transport' => 'postMessage',
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_free_custom_text',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Enrolled - Custom Text', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'enrolled_custom_text',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '',
|
|
'transport' => 'postMessage',
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_completed_custom_text',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Completed - Custom Text', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'completed_custom_text',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '',
|
|
'transport' => 'postMessage',
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_ld_archive_pagi_aligment',
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'radio-buttonset',
|
|
'settings' => 'ld_archive_pagi_aligment',
|
|
'label' => esc_html__( 'pagination', 'upstudy' ),
|
|
'section' => 'upstudy_ld_archive_page_section',
|
|
'default' => 'center',
|
|
'choices' => [
|
|
'flex-start' => esc_html__('Left', 'upstudy'),
|
|
'center' => esc_html__('Center', 'upstudy'),
|
|
'flex-end' => esc_html__('Right', 'upstudy'),
|
|
],
|
|
] );
|
|
/*----------------------------
|
|
LearnDash Single Page
|
|
----------------------------*/
|
|
Kirki::add_section( 'upstudy_ld_single_page_section', array(
|
|
'title' => esc_html__( 'Course Single Page', 'upstudy' ),
|
|
'panel' => 'upstudy_ld_panel'
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'select',
|
|
'settings' => 'ld_single_page_layout',
|
|
'label' => esc_html__( 'Page Style', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
'multiple' => false,
|
|
'choices' => [
|
|
'1' => esc_html__('Style 01', 'upstudy'),
|
|
'2' => esc_html__('Style 02', 'upstudy'),
|
|
'3' => esc_html__('Style 03', 'upstudy'),
|
|
// '4' => esc_html__('Style 04', 'upstudy'),
|
|
// '5' => esc_html__('Style 05', 'upstudy'),
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_ld_intro_video_position',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'radio-buttonset',
|
|
'settings' => 'ld_intro_video_position',
|
|
'label' => esc_html__( 'Intro Image/Video Preview', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => 'intro_video_sidebar',
|
|
'multiple' => false,
|
|
'choices' => [
|
|
'none' => esc_html__('Off', 'upstudy'),
|
|
'intro_video_content' => esc_html__('Content Area', 'upstudy'),
|
|
'intro_video_sidebar' => esc_html__('Sidebar Area', 'upstudy'),
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'select',
|
|
'settings' => 'ld_single_title_tag',
|
|
'label' => esc_html__( 'Title Tag', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => 'h1',
|
|
'placeholder' => esc_html__( 'Select an tag...', 'upstudy' ),
|
|
'multiple' => false,
|
|
'choices' => [
|
|
'h1' => esc_html__( 'H1', 'upstudy' ),
|
|
'h2' => esc_html__( 'H2', 'upstudy' ),
|
|
'h3' => esc_html__( 'H3', 'upstudy' ),
|
|
'h4' => esc_html__( 'H4', 'upstudy' ),
|
|
'h5' => esc_html__( 'H5', 'upstudy' ),
|
|
'h6' => esc_html__( 'H6', 'upstudy' ),
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_breadcrumb',
|
|
'label' => esc_html__( 'Breadcrumb?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_ld_single_sidebar_sticky',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_course_info',
|
|
'label' => esc_html__( 'Course Info?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_ld_single_course_info',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'radio-buttonset',
|
|
'settings' => 'ld_custom_features_position',
|
|
'label' => esc_html__( 'Custom Features List Position', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => 'bottom',
|
|
'choices' => [
|
|
'top' => esc_html__('Top', 'upstudy'),
|
|
'bottom' => esc_html__('Buttom', 'upstudy'),
|
|
],
|
|
] );
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_ld_single_sidebar_sticky',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_sidebar_sticky',
|
|
'label' => esc_html__( 'Sidebar Sticky?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_ld_single_course_graduation',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Custom Heading', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'ld_single_info_heading',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => esc_html__( 'Course Info', 'upstudy' ),
|
|
'transport' => 'postMessage',
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_last_update',
|
|
'label' => esc_html__( 'Last Updated?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_instructor_single',
|
|
'label' => esc_html__( 'Created By?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Created By Text', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'ld_instructor_single_text',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '',
|
|
'transport' => 'refresh',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_instructor_single',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
) );
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_enrolled_single',
|
|
'label' => esc_html__( 'Enrolled Students?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Enrolled Text', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'ld_enrolled_single_text',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '',
|
|
'transport' => 'refresh',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_enrolled_single',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
) );
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_lesson_single',
|
|
'label' => esc_html__( 'Lesson?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Lessons Text', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'ld_lesson_single_text',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '',
|
|
'transport' => 'refresh',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_lesson_single',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
) );
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_topic',
|
|
'label' => esc_html__( 'Topics?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Topics Text', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'ld_single_topic_text',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '',
|
|
'transport' => 'refresh',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_single_topic',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
) );
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_duration',
|
|
'label' => esc_html__( 'Duration?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Duration Text', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'ld_single_duration_text',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '',
|
|
'transport' => 'refresh',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_single_duration',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
) );
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_cat',
|
|
'label' => esc_html__( 'Category?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Category Text', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'ld_single_cat_text',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '',
|
|
'transport' => 'refresh',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_single_cat',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
) );
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_language',
|
|
'label' => esc_html__( 'Language?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Language Text', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'ld_single_language_text',
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '',
|
|
'transport' => 'refresh',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_single_language',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
) );
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_social_shear',
|
|
'label' => esc_html__( 'Social Share?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => '1',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_course_cat',
|
|
'label' => esc_html__( 'Category List?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => false,
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_review',
|
|
'label' => esc_html__( 'Reviews?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => false,
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_excerpt',
|
|
'label' => esc_html__( 'Excerpt/Short Text?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => false,
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_single_certificate',
|
|
'label' => esc_html__( 'Certificate?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_single_page_section',
|
|
'default' => false,
|
|
] );
|
|
|
|
/*----------------------------
|
|
Advanced
|
|
----------------------------*/
|
|
Kirki::add_section( 'upstudy_ld_lesson_section', array(
|
|
'title' => esc_html__( 'Course Lesson Page', 'upstudy' ),
|
|
'panel' => 'upstudy_ld_panel'
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'upstudy_ld_lesson_title',
|
|
'label' => esc_html__( 'Lesson Title', 'upstudy' ),
|
|
'section' => 'upstudy_ld_lesson_section',
|
|
'default' => false,
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'upstudy_ld_lesson_related_post',
|
|
'label' => esc_html__( 'Show Related Posts', 'upstudy' ),
|
|
'section' => 'upstudy_ld_lesson_section',
|
|
'default' => false,
|
|
] );
|
|
|
|
// Kirki::add_field( 'upstudy_theme_config', [
|
|
// 'type' => 'radio-buttonset',
|
|
// 'settings' => 'upstudy_ld_lesson_related_post',
|
|
// 'label' => esc_html__( 'Related Course Preview', 'upstudy' ),
|
|
// 'section' => 'upstudy_ld_lesson_section',
|
|
// 'default' => 'content',
|
|
// 'multiple' => false,
|
|
// 'choices' => [
|
|
// 'none' => esc_html__('Off', 'upstudy'),
|
|
// 'sidebar' => esc_html__('Sidebar Area', 'upstudy'),
|
|
// 'content' => esc_html__('Content Area', 'upstudy'),
|
|
// ],
|
|
// ] );
|
|
|
|
/*----------------------------
|
|
LearnDash Related Courses
|
|
----------------------------*/
|
|
|
|
Kirki::add_section( 'upstudy_ld_related_course_section', array(
|
|
'title' => esc_html__( 'Related Courses', 'upstudy' ),
|
|
'panel' => 'upstudy_ld_panel'
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'radio-buttonset',
|
|
'settings' => 'ld_related_course_position',
|
|
'label' => esc_html__( 'Related Course Preview', 'upstudy' ),
|
|
'section' => 'upstudy_ld_related_course_section',
|
|
'default' => 'content',
|
|
'multiple' => false,
|
|
'choices' => [
|
|
'none' => esc_html__('Off', 'upstudy'),
|
|
'sidebar' => esc_html__('Sidebar Area', 'upstudy'),
|
|
'content' => esc_html__('Content Area', 'upstudy'),
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'select',
|
|
'settings' => 'ld_related_course_style',
|
|
'label' => esc_html__( 'Related Course Style', 'upstudy' ),
|
|
'section' => 'upstudy_ld_related_course_section',
|
|
'default' => 'square',
|
|
'choices' => [
|
|
'round' => esc_html__('Round', 'upstudy'),
|
|
'square' => esc_html__('Square', 'upstudy'),
|
|
],
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_related_course_position',
|
|
'operator' => '===',
|
|
'value' => 'sidebar',
|
|
],
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', array(
|
|
'label' => esc_html__( 'Custom Heading', 'upstudy' ),
|
|
'type' => 'text',
|
|
'settings' => 'ld_related_course_title',
|
|
'section' => 'upstudy_ld_related_course_section',
|
|
'default' => 'Related Courses',
|
|
'transport' => 'postMessage',
|
|
'active_callback' => [
|
|
[
|
|
'setting' => 'ld_course_feature_cat_show',
|
|
'operator' => '===',
|
|
'value' => true,
|
|
],
|
|
],
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'radio-buttonset',
|
|
'settings' => 'ld_related_course_by',
|
|
'label' => esc_html__( 'Related Course Query By', 'upstudy' ),
|
|
'section' => 'upstudy_ld_related_course_section',
|
|
'default' => 'tags',
|
|
'choices' => [
|
|
'category' => esc_html__('Category', 'upstudy'),
|
|
'tags' => esc_html__('Tags', 'upstudy'),
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'number',
|
|
'settings' => 'ld_related_course_items',
|
|
'label' => esc_html__( 'Number of Courses', 'upstudy' ),
|
|
'section' => 'upstudy_ld_related_course_section',
|
|
'default' => 3,
|
|
'choices' => [
|
|
'min' => 1,
|
|
'step' => 1,
|
|
],
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'radio-buttonset',
|
|
'settings' => 'ld_related_course_columns',
|
|
'label' => esc_html__( 'Related Course Columns', 'upstudy' ),
|
|
'section' => 'upstudy_ld_related_course_section',
|
|
'default' => '4',
|
|
'choices' => [
|
|
'3' => __('4 Columns', 'upstudy'),
|
|
'4' => __('3 Columns', 'upstudy'),
|
|
'6' => __('2 Columns', 'upstudy'),
|
|
],
|
|
] );
|
|
|
|
/*----------------------------
|
|
LearnDash Group Page
|
|
----------------------------*/
|
|
Kirki::add_section( 'upstudy_ld_groups_section', array(
|
|
'title' => esc_html__( 'Groups Archive Page', 'upstudy' ),
|
|
'panel' => 'upstudy_ld_panel'
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'text',
|
|
'settings' => 'ld_groups_archive_page_title',
|
|
'label' => esc_html__( 'Custom Groups Page Title', 'upstudy' ),
|
|
'section' => 'upstudy_ld_groups_section',
|
|
'default' => esc_html__('Groups Courses', 'upstudy'),
|
|
'transport' => 'auto',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'custom',
|
|
'settings' => 'divider_ld_course_archive_style',
|
|
'section' => 'upstudy_ld_groups_section',
|
|
'default' => '<hr>',
|
|
] );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'number',
|
|
'settings' => 'ld_groups_course_per_page',
|
|
'label' => esc_html__( 'Number of Courses', 'upstudy' ),
|
|
'section' => 'upstudy_ld_groups_section',
|
|
'default' => 9,
|
|
'choices' => [
|
|
'min' => 1,
|
|
'step' => 1,
|
|
],
|
|
] );
|
|
/*----------------------------
|
|
Advanced
|
|
----------------------------*/
|
|
Kirki::add_section( 'upstudy_ld_advanced_section', array(
|
|
'title' => esc_html__( 'Advanced', 'upstudy' ),
|
|
'panel' => 'upstudy_ld_panel'
|
|
) );
|
|
|
|
Kirki::add_field( 'upstudy_theme_config', [
|
|
'type' => 'toggle',
|
|
'settings' => 'ld_course_single_conflict_issue',
|
|
'label' => esc_html__( 'Conflict Issue With Course Single Page?', 'upstudy' ),
|
|
'section' => 'upstudy_ld_advanced_section',
|
|
'default' => true,
|
|
] );
|