Import legacy nurinda.co.id website

This commit is contained in:
dirga committed 2026-10-01 14:27:19 +07:00
1 parent 3f59bb9038
commit 6e21646ac4
13389 files changed
+3246690

No files matched your search

@@ -0,0 +1,42 @@
function wpsp_get_post_lists() {
var response = jQuery.getJSON({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpsp_get_post_lists',
wpsp_nonce: wpsp_nonce
},
async: false,
dataType: 'json'
});
return response.responseJSON;
}
console.log(wpsp_get_post_lists());
(function() {
tinymce.PluginManager.add('wpsp_shortcode_button', function( editor, url ) {
editor.addButton( 'wpsp_shortcode_button', {
title: wpsp_add_posts,
icon: 'wpsp-add-icon',
onclick: function() {
editor.windowManager.open( {
width: 300,
height: 75,
title: wpsp_add_posts,
body: [
{
type: 'listbox',
name: 'wpsp_add_posts',
label: false,
'values': wpsp_get_post_lists(),
}],
onsubmit: function( e ) {
editor.insertContent( '[wp_show_posts id="' + e.data.wpsp_add_posts + '"]');
}
});
}
});
});
})();