| Server IP : 172.67.147.195 / Your IP : 216.73.216.142 Web Server : Apache/2 System : Linux hosting8537.lvs 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : mienphi ( 1014) PHP Version : 8.2.14 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/mienphi/public_html/wp-content/themes/eduma/inc/admin/customizer-sections/ |
Upload File : |
<?php
/**
* Section Course Features
*
* @package Eduma
*/
thim_customizer()->add_section(
array(
'id' => 'course_features',
'panel' => 'course',
'title' => esc_html__( 'Settings', 'eduma' ),
'priority' => 5,
)
);
// Enable or Disable Login Popup when take this course
thim_customizer()->add_field(
array(
'id' => 'thim_learnpress_single_popup',
'type' => 'switch',
'label' => esc_html__( 'Enable Login Popup', 'eduma' ),
'description' => esc_html__( 'Enable login popup when take this course with user not logged in.', 'eduma' ),
'section' => 'course_features',
'default' => true,
'priority' => 10,
'choices' => array(
true => esc_html__( 'Show', 'eduma' ),
false => esc_html__( 'Hide', 'eduma' ),
),
)
);
thim_customizer()->add_field(
array(
'id' => 'thim_single_course_offline',
'type' => 'switch',
'label' => esc_html__( 'Enable Course Offline', 'eduma' ),
'section' => 'course_features',
'default' => false,
'priority' => 13,
'choices' => array(
true => esc_html__( 'Enable', 'eduma' ),
false => esc_html__( 'Disable', 'eduma' ),
)
)
);
// Feature: Setup contact form 7 shortcode
thim_customizer()->add_field(
array(
'type' => 'text',
'id' => 'thim_learnpress_shortcode_contact',
'label' => esc_html__( 'ID of contact Form 7 Shortcode', 'eduma' ),
'tooltip' => esc_html__( 'Only use for Demo Kindergarten.', 'eduma' ),
'section' => 'course_features',
'priority' => 30,
'active_callback' => array(
array(
'setting' => 'thim_single_course_offline',
'operator' => '===',
'value' => true,
),
),
)
);
// Setup timetable link for single course
thim_customizer()->add_field(
array(
'type' => 'text',
'id' => 'thim_learnpress_timetable_link',
'label' => esc_html__( 'Timetable Link', 'eduma' ),
'tooltip' => esc_html__( 'Only use for Demo Kindergarten.', 'eduma' ),
'section' => 'course_features',
'priority' => 40,
'active_callback' => array(
array(
'setting' => 'thim_single_course_offline',
'operator' => '===',
'value' => true,
),
),
)
);
thim_customizer()->add_field(
array(
'id' => 'thim_course_price_color',
'type' => 'color',
'label' => esc_html__( 'Course Price Color', 'eduma' ),
'section' => 'course_features',
'priority' => 40,
'default' => '#f24c0a',
)
);
//// Enable or Disable Login Popup when take this course
if ( class_exists( '\Thim_EL_Kit\Functions' ) ) {
$loop_course_item = array( '' => esc_html__( 'Default', 'thim-elementor-kit' ) ) + \Thim_EL_Kit\Functions::instance()->get_pages_loop_item( 'lp_course' );
$hiden_class = '';
} else {
$loop_course_item = array( '' => esc_html__( 'Default', 'thim-elementor-kit' ) );
$hiden_class = ' hidden';
}
thim_customizer()->add_field(
array(
'id' => 'loop_course_item',
'type' => 'select',
'label' => esc_html__( 'Loop Course Item', 'eduma' ),
'section' => 'course_features',
'description' => sprintf( __( 'You can build loop course item in %s.', 'eduma' ), '<a href="' . admin_url( 'edit.php?post_type=thim_elementor_kit&thim_elementor_type=loop_item' ) . '" target="_blank">' . __( 'Thim Elementor Kit', 'eduma' ) . '</a>' ),
'priority' => 50,
'choices' => $loop_course_item,
'default' => '',
'wrapper_attrs' => array(
'class' => '{default_class}'.$hiden_class
)
)
);