PluginProbe
Jock On Air Now (JOAN) / 5.2.0
Jock On Air Now (JOAN) v5.2.0
4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 5.0 5.1 5.2.0 5.3.0 5.4.0 5.5.0 5.5.1 5.5.2 5.5.3 5.5.4 5.5.6 5.5.7 5.5.8 5.5.9 5.6 5.6.1 5.6.2 5.6.3 5.6.4 All 77 releases
joan / joan.php

joan.php in Jock On Air Now (JOAN) 5.2.0, at joan.php

615 lines 22.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: Jock On Air Now
4 Plugin URI: https://gandenterprisesinc.com/jock-on-air-now/
5 Description: JOAN allows you to create, manage and display your station's programming schedule quite easily. After install use the widget to display the current show/Jock on air, display full station schedule by inserting the included shortcode into posts or pages. Create a new page, name it schedule or whatever you like place the schedule shortcode on it, add to your menu to display your full schedule.
6 Author: G &amp; D Enterprises, Inc.
7 Version: 5.2.0
8 Author URI: https://www.gandenterprisesinc.com
9
10 */
11
12
13 if (!defined('ABSPATH')) {
14 exit("Sorry, you are not allowed to access this page directly.");
15 }
16
17 /* Set constant for plugin directory */
18 define( 'SS3_URL', WP_PLUGIN_URL.'/joan' );
19
20 $joan_db_version = "3.1.1";
21
22 if (!isset($wpdb))
23 $wpdb = $GLOBALS['wpdb'];
24
25 $joanTable = $wpdb->prefix . "WPJoan";
26
27 $tz = get_option('timezone_string');
28 date_default_timezone_set($tz);
29
30 //Installation
31 function joan_install () {
32 global $wpdb;
33 global $joan_db_version;
34 global $joanTable;
35
36 $joanTable = $wpdb->prefix . "WPJoan";
37
38 if($wpdb->get_var("show tables like '$joanTable'") != $joanTable) {
39
40 $sql = "CREATE TABLE " . $joanTable . " (
41 id int(9) NOT NULL AUTO_INCREMENT,
42 dayOfTheWeek text NOT NULL,
43 startTime int(11) NOT NULL,
44 endTime int(11) NOT NULL,
45 startClock text not null,
46 endClock text not null,
47 showName text NOT NULL,
48 linkURL text NOT null,
49 imageURL text not null,
50 UNIQUE KEY id (id)
51 );";
52
53 require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
54 dbDelta($sql);
55
56 add_option("joan_db_version", $joan_db_version);
57 }
58 }
59
60 register_activation_hook(__FILE__,'joan_install');
61
62 //Register and create the Widget
63
64 class JoanWidget extends WP_Widget {
65
66 /**
67 * Declares the JoanWidget class.
68 *
69 */
70 function __construct(){
71 $widget_ops = array('classname' => 'joan_widget', 'description' => __( "Display your schedule with style.") );
72 $control_ops = array('width' => 300, 'height' => 300);
73 parent::__construct( 'Joan', __( 'Joan', 'joan' ), $widget_ops, $control_ops );
74 }
75
76 /**
77 * Displays the Widget
78 *
79 */
80 function widget($args, $instance){
81
82 extract($args);
83 $title = apply_filters('widget_title', empty($instance['title']) ? '&nbsp;' : $instance['title']);
84
85 # Before the widget
86 echo $before_widget;
87
88 # The title
89 if ( $title )
90 echo $before_title . $title . $after_title;
91
92 # Make the Joan widget
93 echo showme_joan();
94
95 # After the widget
96 echo $after_widget;
97 }
98
99 /**
100 * Saves the widgets settings.
101 *
102 */
103 function update($new_instance, $old_instance){
104 $instance = $old_instance;
105 $instance['title'] = strip_tags(stripslashes($new_instance['title']));
106 $instance['lineOne'] = strip_tags(stripslashes($new_instance['lineOne']));
107 $instance['lineTwo'] = strip_tags(stripslashes($new_instance['lineTwo']));
108
109 return $instance;
110 }
111
112 /**
113 * Creates the edit form for the widget.
114 *
115 */
116 function form($instance){
117 //Defaults
118 $instance = wp_parse_args( (array) $instance, array('title'=>'On Air Now') );
119
120 $title = htmlspecialchars($instance['title']);
121
122 # Output the options
123 echo '<p style="text-align:right;"><label for="' . $this->get_field_name('title') . '">' . __('Title:') . ' <input style="width: 250px;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . $title . '" /></label></p>';
124 }
125 } //End of widget
126
127
128 function JoanInit() {
129 register_widget('JoanWidget');
130 }
131 add_action('widgets_init', 'JoanInit');
132
133
134 //==== OPTIONS ====
135 add_option('joan_upcoming', 'yes');
136 add_option('joan_use_images', 'yes');
137 add_option('joan_shutitdown', 'no');
138 add_option('off_air_message', 'We are currently off the air.');
139 add_option('joan_css', '');
140 add_option('joan_shutitdown', 'no');
141
142
143 //==== SHORTCODES ====
144
145 function joan_schedule_handler($atts, $content=null, $code=""){
146
147 if (!isset($wpdb)) $wpdb = $GLOBALS['wpdb'];
148 global $wpdb;
149 global $joanTable;
150
151 //Get the current schedule, divided into days
152 $daysOfTheWeek = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
153
154 $schedule = array();
155
156 $output = '';
157
158 foreach ($daysOfTheWeek as $day) {
159 if (!isset($wpdb)) $wpdb = $GLOBALS['wpdb'];
160 //Add this day's shows HTML to the $output array
161 $showsForThisDay = $wpdb->get_results( $wpdb->prepare ( "SELECT * FROM $joanTable WHERE dayOfTheWeek = %s ORDER BY startTime", $day ));
162
163 //Check to make sure this day has shows before saving the header
164 if ($showsForThisDay){
165 $output .= '<h2>'.$day.'</h2>';
166 $output .= '<ul class="joan-schedule">';
167 foreach ($showsForThisDay as $show){
168 $showName = $show->showName;
169 $startClock = $show->startClock;
170 $endClock = $show->endClock;
171 $linkURL = $show->linkURL;
172
173 if ($linkURL){
174 $showName = '<a href="'.$linkURL.'">'.$showName.'</a>';
175 }
176
177 $output .= '<li><strong>'.$startClock.'</strong> - <strong>'.$endClock.'</strong>: '.$showName.'</li>';
178
179 }
180 $output .= '</ul>';
181 }
182 }
183 return $output;
184 }
185
186 add_shortcode('joan-schedule', 'joan_schedule_handler');
187
188 //Henry custom stuff
189 function joan_schedule_today($atts, $content=null, $code=""){
190
191 global $wpdb;
192 global $joanTable;
193
194 //Get the current schedule, divided into days
195 $daysOfTheWeek = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
196
197 $today = date('l');
198
199 $schedule = array();
200
201 $output = '';
202
203 foreach ($daysOfTheWeek as $day) {
204 //Add this day's shows HTML to the $output array
205 $showsForThisDay = $wpdb->get_results( $wpdb->prepare ( "SELECT * FROM $joanTable WHERE dayOfTheWeek = %s ORDER BY startTime", $day ));
206
207 if ($day == $today) {
208
209 //Check to make sure this day has shows before saving the header
210 if ($showsForThisDay){
211 $output .= '<h2 class="widget-title">What\'s On Today - '.$today.'</h2>';
212 $output .= '<ul class="joan-schedule">';
213 foreach ($showsForThisDay as $show){
214 $showName = $show->showName;
215 $startClock = $show->startClock;
216 $endClock = $show->endClock;
217 $linkURL = $show->linkURL;
218 if ($linkURL){
219 $showName = '<a href="'.$linkURL.'">'.$showName.'</a>';
220 }
221 $output .= '<li><span class="show-time">'.$startClock./*' - '.$endClock.*/':</span> <span class="show-name">'.$showName.'</span></li>';
222 }
223 $output .= '</ul>';
224 }
225 }
226 }
227 return $output;
228 }
229
230 add_shortcode('schedule-today', 'joan_schedule_today');
231
232 //End Henry custom stuff
233
234 function showme_joan(){
235
236 $output = '<style>'.get_option('joan_css', '').'</style>';
237 $output .= '<div class="joan-now-playing"></div>';
238 return $output;
239
240 }
241
242 add_shortcode('joan-now-playing', 'showme_joan');
243
244
245 if ( is_admin() ){ // admin actions
246 add_action('admin_menu', 'joan_plugin_menu');
247 }
248
249
250 function joan_image_upload_scripts() {
251 wp_enqueue_script('media-upload');
252 wp_enqueue_script('thickbox');
253 wp_enqueue_script('my-upload');
254 }
255
256 function joan_image_upload_styles() {
257 wp_enqueue_style('thickbox');
258 }
259
260 if (isset($_GET['page']) && $_GET['page'] == 'joan_settings') {
261 add_action('admin_print_scripts', 'joan_image_upload_scripts');
262 add_action('admin_print_styles', 'joan_image_upload_styles');
263 }
264
265 //==== ADMIN OPTIONS AND SCHEDULE PAGE ====
266
267 function joan_plugin_menu() {
268 global $pagenow;
269 // Add a new submenu under Options:
270 add_menu_page('JOAN', 'Jock On Air Now', 'activate_plugins', 'joan_settings', 'joan_options_page');
271
272 // Modified by PHP Stack
273 if ($pagenow == 'admin.php' && isset($_GET['page'])) {
274 if ($_GET['page'] == 'joan_settings') {
275 wp_enqueue_style( "joan-admin", plugins_url('admin.css', __FILE__) );
276 wp_enqueue_script( "joan-admin", plugins_url('admin.js', __FILE__), array('jquery'), '1.0.0', true );
277 }
278 }
279 }
280
281 function joan_options_page(){
282 if (!isset($wpdb)) $wpdb = $GLOBALS['wpdb'];
283 global $wpdb;
284 global $joanTable;
285 //Check to see if the user is upgrading from an old Joan database
286
287 if (isset($_POST['upgrade-database'])){
288 if (check_admin_referer('upgrade_joan_database', 'upgrade_joan_database_field')){
289
290 if ($wpdb->get_var("show tables like '$joanTable'") != $joanTable){
291 $sql = "CREATE TABLE " . $joanTable . " (
292 id int(9) NOT NULL AUTO_INCREMENT,
293 dayOfTheWeek text NOT NULL,
294 startTime int(11) NOT NULL,
295 endTime int(11) NOT NULL,
296 startClock text not null,
297 endClock text not null,
298 showName text NOT NULL,
299 linkURL text NOT null,
300 imageURL text not null,
301 UNIQUE KEY id (id)
302 );";
303
304 $wpdb->query($sql);
305 }
306
307 $joanOldTable = $wpdb->prefix.'joan';
308
309 $oldJoanShows = $wpdb->get_results($wpdb->prepare("SELECT id, showstart, showend, showname, linkUrl, imageUrl FROM $joanOldTable WHERE id != %d", -1));
310 if ($oldJoanShows){
311 foreach ($oldJoanShows as $show){
312 $showname = $show->showname;
313 $startTime = $show->showstart;
314 $endTime = $show->showend;
315 $startDay = date('l', $startTime);
316 $startClock = date('g:i a', ($startTime));
317 $endClock = date('g:i a', ($endTime));
318 $linkURL = $show->linkUrl;
319 if ($linkURL == 'No link specified.'){
320 $linkURL = '';
321 }
322 $imageURL = $show->imageUrl;
323
324 //Insert the new show into the New Joan Databse
325 $wpdb->query( $wpdb->prepare("INSERT INTO $joanTable (dayOfTheWeek, startTime,endTime,startClock, endClock, showName, imageURL, linkURL) VALUES (%s, %d, %d , %s, %s, %s, %s, %s)", $startDay, $startTime, $endTime, $startClock, $endClock, $showname, $imageURL, $linkURL ) );
326 }
327 }
328 }
329 //Remove the old Joan table if the new table has been created
330 if($wpdb->get_var("show tables like '$joanTable'") == $joanTable) {
331 $wpdb->query("DROP TABLE $joanOldTable");
332 }
333 }
334
335 // echo '<script type="text/javascript" src="'.SS3_URL.'/admin.js" ></script>';
336
337 ?>
338 <div class="wrap">
339 <div class="joan-message-window">Message goes here.</div>
340 <h1>Jock On Air Now</h1>
341 <p><em>Let your listeners know when their favorite jock/show is on or about to come on.</em><br /><small>by <a href='http://www.gandenterprisesinc.com' target='_blank'>G &amp; D Enterprises, Inc.</a></small></p>
342
343 <?php
344 //Check to see if Joan 2.0 is installed
345 $table_name = $wpdb->prefix . "joan";
346 if($wpdb->get_var("show tables like '$table_name'") == $table_name) {
347 ?>
348 <div class="error">
349 <form method="post" action="">
350 <p><strong>Previous version of Joan detected.</strong> Be sure to back up your database before performing this upgrade. <input type="submit" class="button-primary" value="Upgrade my Joan Database" /></p>
351 <input type="hidden" name="upgrade-database" value=' ' />
352 <?php wp_nonce_field('upgrade_joan_database', 'upgrade_joan_database_field'); ?>
353 </form>
354 </div>
355 <?php
356 }
357
358 ?>
359
360 <input type="hidden" class="script-src" readonly="readonly" value="<?= $_SERVER['PHP_SELF']; ?>?page=joan_settings" />
361 <?php wp_nonce_field('delete_joan_entry', 'delete_entries_nonce_field'); ?>
362
363 <ul class="tab-navigation">
364 <li class="joan-scheudle">SCHEDULE</li>
365 <li class="joan-options">OPTIONS</li>
366 <li class="shut-it-down">SUSPEND</li>
367 <li class="joan-pre">PREMIUM</li>
368 </ul>
369 <div class="joan-tabs">
370
371 <div class="tab-container" id="joan-schedule">
372
373 <h2>Schedule: Add New Shows To Schedule or Edit Existing Show Schedule</h2>
374
375
376 <div class="add-new-entry">
377
378 <form id="add-joan-entry" method="post" action="<?php echo get_admin_url()?>admin-ajax.php">
379 <input type='hidden' name='action' value='show-time-curd' />
380 <div class="set-joan-show-deets">
381 <div class="show-time-container">
382 <h3>Show Start</h3>
383 <label for="start">
384 <select class="startDay" name="sday">
385 <option value="Sunday">Sunday</option>
386 <option value="Monday">Monday</option>
387 <option value="Tuesday">Tuesday</option>
388 <option value="Wednesday">Wednesday</option>
389 <option value="Thursday">Thursday</option>
390 <option value="Friday">Friday</option>
391 <option value="Saturday">Saturday</option>
392 </select>
393 </label>
394
395 <label for="starttime">
396 <input id="starttime" class="text" name="startTime" size="5" maxlength="5" type="text" value="00:00" /></label>
397 </div>
398 <div class="show-time-container">
399 <h3>Show End</h3>
400 <label for="endday">
401 <select class="endDay" name="eday">
402 <option value="Sunday">Sunday</option>
403 <option value="Monday">Monday</option>
404 <option value="Tuesday">Tuesday</option>
405 <option value="Wednesday">Wednesday</option>
406 <option value="Thursday">Thursday</option>
407 <option value="Friday">Friday</option>
408 <option value="Saturday">Saturday</option>
409 </select>
410 </label>
411
412 <label for="endtime">
413 <input id="endtime" class="text" name="endTime" size="5" maxlength="5" type="text" value="00:00" /></label>
414 </div>
415 <div class="clr"></div>
416 <p><strong>Be sure to use 24 hour time format (01:00 = 1 AM, 13:00 = 1 PM)</strong></p>
417 <p>Also, make sure your <a href="/wp-admin/options-general.php">timezone <strong>city</strong></a> is set appropriately.(Select the city name the best matches your local time(Not the UTC)<br/>
418 <small><em>Current timezone: <?php if (get_option('timezone_string') == '') { echo '<strong style="color:red;">Set your <a href="options-general.php">timezone</a> city now.</strong></em></small></p>'; } else { echo get_option('timezone_string'); ?></em></small></p>
419
420 </div>
421 <div class="set-joan-show-deets">
422 <label for="showname"><h3>Show Details</h3></label>
423 <p>Name: <br/>
424 <input id="showname" type="text" name="showname" class="show-detail" />
425 </p>
426
427 <p>Link URL (optional):<br />
428 <label for="linkUrl">
429
430 <input type="text" name="linkUrl" placeholder="No URL specified." class="show-detail" />
431
432 </p>
433
434 <p id="primary-image"></p>
435 <p><input class="image-url" type="hidden" name="imageUrl" data-target-field-name="new show" value=""/></p>
436 <p><input type="button" class="upload-image button" data-target-field="new show" value="Upload Image" /></p>
437 <img src="" style="display:none;" data-target-field-name="new show" />
438 <p><a id="remove-primary-image" href="#"><small>Remove Image</small></a></p>
439
440
441 <input type="submit" class="button-primary" style="cursor: pointer;" value="Add Show" />
442 <input type="hidden" name="crud-action" value="create" />
443 <?php wp_nonce_field('add_joan_entry', 'joan_nonce_field'); ?>
444
445 <?php } ?>
446
447 </div>
448 </form>
449
450 <div class="clr"></div>
451
452 </div>
453
454 <h3>Current Schedule</h3>
455
456 <p>Edit Schedule: <a href="#" class="display-toggle full-display">Expanded</a> | <a href="#" class="display-toggle simple-display">Retract</a></p>
457
458 <form method="post" action="<?php echo get_admin_url()?>admin-ajax.php" class="joan-update-shows">
459 <input type='hidden' name='action' value='show-time-curd' />
460 <div class="joan-schedule loading">
461 <div class="sunday-container"><h2>Sunday</h2></div><!-- end this day of the week -->
462 <div class="monday-container"><h2>Monday</h2></div><!-- end this day of the week -->
463 <div class="tuesday-container"><h2>Tuesday</h2></div><!-- end this day of the week -->
464 <div class="wednesday-container"><h2>Wednesday</h2></div><!-- end this day of the week -->
465 <div class="thursday-container"><h2>Thursday</h2></div><!-- end this day of the week -->
466 <div class="friday-container"><h2>Friday</h2></div><!-- end this day of the week -->
467 <div class="saturday-container"><h2>Saturday</h2></div><!-- end this day of the week -->
468 </div>
469 <input type="hidden" name="crud-action" value="update" />
470 <?php wp_nonce_field('save_joan_entries', 'joan_entries_nonce_field'); ?>
471
472 </form>
473
474 <p>Edit Schedule: <a href="#" class="display-toggle full-display">Expanded</a> | <a href="#" class="display-toggle simple-display">Retract</a></p>
475
476
477 </div>
478
479 <div class="tab-container" id="joan-options">
480 <form method="post" action="">
481 <h2>Select Options Below</h2>
482 <?php
483
484 //Save posted options
485
486 if (isset($_POST['joan_options'])){
487
488
489 update_option('joan_upcoming', $_POST['joan_options']['showUpcoming']);
490 update_option('joan_use_images', $_POST['joan_options']['imagesOn']);
491 update_option('off_air_message', htmlentities(stripslashes($_POST['joan_options']['offAirMessage'])));
492 update_option('joan_css', htmlentities(stripslashes($_POST['joan_options']['joanCSS'])));
493
494 } else if (isset($_POST['shut-it-down'])) {
495 update_option('joan_shutitdown', $_POST['shut-it-down']);
496 }
497
498 //Set options variables
499 $showUpcoming = get_option('joan_upcoming');
500 $imagesOn = get_option('joan_use_images');
501 $shutItDown = get_option('joan_shutitdown');
502 $offAirMessage = get_option('off_air_message');
503 $joanCSS = get_option('joan_css');
504 $shutItDown = get_option('joan_shutitdown');
505
506 ?>
507
508 <h3>Display Images</h3>
509 <form id="option" method="post" action="">
510 <p>Show accompanying images with joans?</p>
511 <label><input type="radio"<?php if($imagesOn == 'yes') { ?> checked="checked"<?php } ?> name="joan_options[imagesOn]" value="yes" /> : Yes</label><br/>
512 <label><input type="radio"<?php if($imagesOn == 'no') { ?> checked="checked"<?php } ?> name="joan_options[imagesOn]" value="no" /> : No</label><br/>
513
514
515 <h3>Upcoming Timeslot</h3>
516
517 <p>Show the name/time of the next timeslot?</p>
518 <label><input type="radio"<?php if($showUpcoming == 'yes') { ?> checked="checked"<?php } ?> name="joan_options[showUpcoming]" value="yes" /> : Yes</label><br/>
519 <label><input type="radio"<?php if($showUpcoming == 'no') { ?> checked="checked"<?php } ?> name="joan_options[showUpcoming]" value="no" /> : No</label><br/>
520
521
522 <h3>Off Air Message</h3>
523 <label>Message:<br /><input type="text" id="off-air-message" value="<?= $offAirMessage; ?>" name="joan_options[offAirMessage]" size="40" /></label>
524
525
526 <p class="submit">
527 <input type="submit" class="button-primary" value="Save Changes" />
528 </p>
529
530 <h2>Display Shortcodes</h2>
531 <h3>[joan-schedule]</h3>
532 <p>Display a list of the times and names of your events, broken down weekly, example:</p>
533 <div style="margin-left:30px;">
534 <h4>Mondays</h4>
535 <ul>
536 <li><strong>5:00 am - 10:00 am</strong> - Morning Ride</li>
537 <li><strong>10:00 am - 12:00 pm</strong> - The Vibe with MarkD</li>
538 </ul>
539 <h4>Saturdays</h4>
540 <ul>
541 <li><strong>10:00 am - 1:00 am</strong> - Drive Time</li>
542 <li><strong>1:00 pm - 4:00 pm</strong> - Kool Jamz</li>
543 </ul>
544 </div>
545 <h3>[joan-now-playing]</h3>
546 <p>Display the Current Show/jock widget.</p>
547 <h3>[schedule-today]</h3>
548 <p>Automatically display your schedule for each day of the week.</p>
549
550 <div class="clr"></div>
551
552
553 </div>
554
555 <div class="tab-container" id="joan-shut-it-down">
556
557 <h2>Temporarily Suspend schedule</h2>
558
559 <form method="post" action="">
560 <p>You can temporarily take down your schedule for any reason, during schedule updates, public holidays or station off-air periods etc.</p>
561 <label><input type="radio"<?php if($shutItDown == 'yes') { ?> checked="checked"<?php } ?> name="shut-it-down" value="yes" /> : Suspend Schedule.</label><br/>
562 <label><input type="radio"<?php if($shutItDown == 'no') { ?> checked="checked"<?php } ?> name="shut-it-down" value="no" /> : Show Current On Air Schedule (Default). </label><br/>
563
564 <p class="submit">
565 <input type="submit" class="button-primary" value="Save changes" />
566 </p>
567 </form>
568
569
570 </div>
571 <div class="tab-container" id="joan-pre">
572
573 <h2>Introducing JOAN Premium, follow the link below to get started with JOAN Premium.</h2>
574 <p>Get Joan Premium</p>
575 <p>*Priority Support</p>
576 <p>*Schedule Import</p>
577 <p>*Multi-site support</p>
578 <p>*Easily ‘duplicate’ show schedules (Repeating shows)</p>
579 <p>*Set a shows’ status</p>
580 <p>*Weekly, Biweekly or Monthly Schedule</p>
581 <p>*Edit existing show time</p>
582 <p>*Custom CSS field</p>
583 <p><a href="https://gandenterprisesinc.com/pricing/" target="_blank"><h2>GET JOAN PREMIUM</h2></a></p>
584 <p><img src="https://caribbeanbusinesslinkup.com/samples/featured_img.jpg"></p>
585
586 </div>
587
588 </div><!-- end the joan tabs -->
589
590 </div>
591
592 <?php
593
594 }
595
596 function joan_header_scripts(){
597
598
599 echo '<script>crudScriptURL = "'.get_admin_url().'admin-ajax.php"</script>';
600 wp_enqueue_script( "joan-front", plugins_url('joan.js', __FILE__), array(), '1.0.0', true );
601
602
603 }
604
605 add_action("wp_head","joan_header_scripts");
606 add_action('wp_ajax_show-time-curd', '_handle_form_action');
607 add_action('wp_ajax_nopriv_show-time-curd', '_handle_form_action');
608
609 function _handle_form_action(){
610
611 include( plugin_dir_path( __FILE__ ) . 'crud.php' );
612
613 die(); // this is required to return a proper result
614 }
615