function et_pb_get_backbone_template() { if (!wp_verify_nonce($_POST['et_admin_load_nonce'], 'et_admin_load_nonce')) { die(-1); } if (!current_user_can('edit_posts')) { die(-1); } $module_slugs = json_decode(str_replace('\\', '', sanitize_text_field($_POST['et_modules_slugs']))); $post_type = sanitize_text_field($_POST['et_post_type']); // get the portion of templates for specified slugs $result = json_encode(ET_Builder_Element::get_modules_templates($post_type, $module_slugs->missing_modules_array)); die($result); }