<?php $plugin_groups = Plugin_Groups_Options::get_single('plugin_groups'); $plugins = get_plugins(); ?> <div class="wrap" id="plugin-groups-main-canvas"> <span class="wp-baldrick spinner" style="float: none; display: block;" data-target="#plugin-groups-main-canvas" data-callback="plorg_canvas_init" data-type="json" data-request="#plugin-groups-live-config" data-event="click" data-template="#main-ui-template" data-autoload="true"></span> </div> <div class="clear"></div> <input type="hidden" class="clear" autocomplete="off" id="plugin-groups-live-config" style="width:100%;" value="<?php echo esc_attr(json_encode($plugin_groups)); ?> "> <script type="text/html" id="main-ui-template"> <?php // pull in the join table card template include PLORG_PATH . 'includes/templates/main-ui.php'; ?> </script>
/** * Create a new item * * @uses "wp_ajax_plorg_create_plugin_groups" action * * @since 0.0.1 */ public function create_new_plugin_groups() { $new = Plugin_Groups_Options::create($_POST['name'], $_POST['slug']); if (is_array($new)) { wp_send_json_success($new); } else { wp_send_json_error($_POST); } }