PluginProbe
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI / 5.8.6
AutomatorWP – No-Code Workflow Automation, Integration & Webhooks Plugin, now with AI v5.8.6
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 5.8.6, at libraries/ct-ajax-list-table/ct-ajax-list-table.php

88 lines 2.4 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
10 if ( ! class_exists( 'CT_Ajax_List_Table' ) ) :
11
12 class CT_Ajax_List_Table {
13
14 /**
15 * @var CT_Ajax_List_Table $instance The one true CT_Ajax_List_Table
16 * @since 1.0.0
17 */
18 private static $instance;
19
20 /**
21 * Get active instance
22 *
23 * @access public
24 * @since 1.0.0
25 * @return CT_Ajax_List_Table self::$instance The one true CT_Ajax_List_Table
26 */
27 public static function instance() {
28 if( !self::$instance ) {
29 self::$instance = new CT_Ajax_List_Table();
30 self::$instance->constants();
31 self::$instance->includes();
32 }
33
34 return self::$instance;
35 }
36
37 /**
38 * Setup plugin constants
39 *
40 * @access private
41 * @since 1.0.0
42 * @return void
43 */
44 private function constants() {
45
46 // Plugin version
47 define( 'CT_AJAX_LIST_TABLE_VER', '1.0.2' );
48
49 // Plugin file
50 define( 'CT_AJAX_LIST_TABLE_FILE', __FILE__ );
51
52 // Plugin path
53 define( 'CT_AJAX_LIST_TABLE_DIR', plugin_dir_path( __FILE__ ) );
54
55 // Plugin URL
56 define( 'CT_AJAX_LIST_TABLE_URL', plugin_dir_url( __FILE__ ) );
57 }
58
59 /**
60 * Include plugin files
61 *
62 * @access private
63 * @since 1.0.0
64 * @return void
65 */
66 private function includes() {
67
68 require_once CT_AJAX_LIST_TABLE_DIR . 'includes/ajax-functions.php';
69 require_once CT_AJAX_LIST_TABLE_DIR . 'includes/functions.php';
70 require_once CT_AJAX_LIST_TABLE_DIR . 'includes/scripts.php';
71
72 }
73
74 }
75
76 /**
77 * The main function responsible for returning the one true CT_Ajax_List_Table instance to functions everywhere
78 *
79 * @since 1.0.0
80 * @return \CT_Ajax_List_Table The one true CT_Ajax_List_Table
81 */
82 function CT_Ajax_List_Table() {
83 return CT_Ajax_List_Table::instance();
84 }
85 add_action( 'ct_init', 'CT_Ajax_List_Table' );
86
87 endif;
88