|
Server : Apache System : Linux s1230 5.15.0-139-generic #149~20.04.1 SMP Tue Jul 14 11:21:49 UTC 2026 x86_64 User : p141464 ( 418825) PHP Version : 7.4.33.12 Disable Function : NONE Directory : /html/KMU-CSR-PLANER/wp-content/plugins/modern-polls/vendor/tinymce/plugins/polls/ |
Upload File : |
(function() {
tinymce.PluginManager.add('mpp-wp_editor_btn', function(editor) {
editor.addCommand('WP-Polls-Insert_Poll', function() {
var poll_id = jQuery.trim(prompt(tinymce.translate('Enter Poll ID')));
while(isNaN(poll_id)) {
poll_id = jQuery.trim(prompt(tinymce.translate('Error: Poll ID must be numeric') + "\n\n" + tinymce.translate('Please enter Poll ID again')));
}
if (poll_id >= -1 && poll_id != null && poll_id != "") {
editor.insertContent('[mpp id="' + poll_id + '"]');
}
});
editor.addButton('mpp-wp_editor_btn', {
text: false,
tooltip: tinymce.translate('Insert Poll'),
icon: 'polls dashicons-before dashicons-chart-bar',
onclick: function() {
tinyMCE.activeEditor.execCommand('WP-Polls-Insert_Poll')
}
});
});
})();