| Server IP : 158.247.231.215 / Your IP : 216.73.217.84 Web Server : Apache/2.4.41 (Ubuntu) System : Linux CTMS 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /mnt/blockstorage/ctms/wp-content/plugins/tutor/assets/lib/ |
Upload File : |
jQuery(document).ready(function($){
'use strict';
/*========================================================================
* Tutor WP Editor Button
*======================================================================== */
/**
* editor.getLang translation support added
*
* @since 1.9.7
*/
tinymce.PluginManager.add('tutor_button', function( editor, url ) {
editor.addButton( 'tutor_button', {
text: editor.getLang('tutor_button.tutor_shortcode'),
icon: false,
type: 'menubutton',
menu: [
{
text: editor.getLang('tutor_button.student_registration_form'),
onclick: function() {
editor.insertContent('[tutor_student_registration_form]');
}
},
{
text: editor.getLang('tutor_button.instructor_registration_form'),
onclick: function() {
editor.insertContent('[tutor_instructor_registration_form]');
}
},
{
text: editor.getLang('tutor_button.courses'),
onclick: function() {
editor.windowManager.open( {
title: editor.getLang('tutor_button.courses_shortcode'),
body: [
{
type: 'textbox',
name: 'id',
label: editor.getLang('tutor_button.courses_separate_by'),
value: ''
},{
type: 'textbox',
name: 'exclude_ids',
label: editor.getLang('tutor_button.exclude_course_ids'),
value: ''
},
{
type: 'textbox',
name: 'category',
label: editor.getLang('tutor_button.category_ids'),
value: ''
},
{type: 'listbox',
name: 'orderby',
label: editor.getLang('tutor_button.order_by'),
onselect: function(e) {
},
'values': [
{text: 'ID', value: 'ID'},
{text: 'title', value: 'title'},
{text: 'rand', value: 'rand'},
{text: 'date', value: 'date'},
{text: 'menu_order', value: 'menu_order'},
{text: 'post__in', value: 'post__in'},
]
},
{type: 'listbox',
name: 'order',
label: editor.getLang('tutor_button.order'),
onselect: function(e) {
},
'values': [
{text: 'DESC', value: 'DESC'},
{text: 'ASC', value: 'ASC'}
]
},
,{
type: 'textbox',
name: 'count',
label: editor.getLang('tutor_button.count'),
value: '6',
}
],
onsubmit: function( e ) {
editor.insertContent( '[tutor_course id="' + e.data.id + '" exclude_ids="'+e.data.exclude_ids+'" category="'+e.data.category+'" orderby="'+e.data.orderby+'" order="'+e.data.order+'" count="'+e.data.count+'"]');
}
});
}
}
]
});
});
});