PluginProbe
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI / 6.0.3
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI v6.0.3
6.0.3 6.0.2 6.0.1 6.0.0 5.8.6 5.8.5 5.8.4 5.8.3 5.8.2 5.8.1 5.8.0 5.7.9.2 5.7.9.1 5.7.8 5.7.9 5.7.6 5.7.7 5.7.5 5.7.4 5.7.3 5.7.2 5.7.1 trunk 5.6.0 5.6.1 All 34 releases
automatorwp / libraries / ct-ajax-list-table / ct-ajax-list-table.php

ct-ajax-list-table.php in AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI 6.0.3, at libraries/ct-ajax-list-table/ct-ajax-list-table.php

90 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Custom Tables - Ajax List Table
4 *
5 * @package Custom_Tables\Ajax_List_Table
6 * @author GamiPress <[email protected]>, rubengc <[email protected]>
7 * @copyright Copyright (c) GamiPress
8 */
9 // Exit if accessed directly
10 if( !defined( 'ABSPATH' ) ) exit;
11
12 if ( ! class_exists( 'CT_Ajax_List_Table' ) ) :
13
14 class CT_Ajax_List_Table {
15
16 /**
17 * @var CT_Ajax_List_Table $instance The one true CT_Ajax_List_Table
18 * @since 1.0.0
19 */
20 private static $instance;
21
22 /**
23 * Get active instance
24 *
25 * @access public
26 * @since 1.0.0
27 * @return CT_Ajax_List_Table self::$instance The one true CT_Ajax_List_Table
28 */
29 public static function instance() {
30 if( !self::$instance ) {
31 self::$instance = new CT_Ajax_List_Table();
32 self::$instance->constants();
33 self::$instance->includes();
34 }
35
36 return self::$instance;
37 }
38
39 /**
40 * Setup plugin constants
41 *
42 * @access private
43 * @since 1.0.0
44 * @return void
45 */
46 private function constants() {
47
48 // Plugin version
49 define( 'CT_AJAX_LIST_TABLE_VER', '1.0.2' );
50
51 // Plugin file
52 define( 'CT_AJAX_LIST_TABLE_FILE', __FILE__ );
53
54 // Plugin path
55 define( 'CT_AJAX_LIST_TABLE_DIR', plugin_dir_path( __FILE__ ) );
56
57 // Plugin URL
58 define( 'CT_AJAX_LIST_TABLE_URL', plugin_dir_url( __FILE__ ) );
59 }
60
61 /**
62 * Include plugin files
63 *
64 * @access private
65 * @since 1.0.0
66 * @return void
67 */
68 private function includes() {
69
70 require_once CT_AJAX_LIST_TABLE_DIR . 'includes/ajax-functions.php';
71 require_once CT_AJAX_LIST_TABLE_DIR . 'includes/functions.php';
72 require_once CT_AJAX_LIST_TABLE_DIR . 'includes/scripts.php';
73
74 }
75
76 }
77
78 /**
79 * The main function responsible for returning the one true CT_Ajax_List_Table instance to functions everywhere
80 *
81 * @since 1.0.0
82 * @return \CT_Ajax_List_Table The one true CT_Ajax_List_Table
83 */
84 function CT_Ajax_List_Table() {
85 return CT_Ajax_List_Table::instance();
86 }
87 add_action( 'ct_init', 'CT_Ajax_List_Table' );
88
89 endif;
90