PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / 6.8.1
Secure Custom Fields v6.8.1
6.9.1 6.9.0 6.8.9 6.8.7 6.8.8 6.8.6 6.8.4 6.8.5 trunk 6.4.0-beta1 6.4.0-beta2 6.4.1 6.4.1-beta3 6.4.1-beta4 6.4.1-beta5 6.4.1-beta6 6.4.1-beta7 6.4.2 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.6.0 6.7.0 6.7.1 6.8.0 6.8.1 6.8.2 6.8.3
secure-custom-fields / includes / admin / tools / class-acf-admin-tool.php
secure-custom-fields / includes / admin / tools Last commit date
class-acf-admin-tool-export.php 1 year ago class-acf-admin-tool-import.php 7 months ago class-acf-admin-tool.php 1 year ago index.php 1 year ago
class-acf-admin-tool.php
175 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit; // Exit if accessed directly
5 }
6
7 if ( ! class_exists( 'ACF_Admin_Tool' ) ) :
8
9 class ACF_Admin_Tool {
10
11
12 /** @var string Tool name */
13 var $name = '';
14
15
16 /** @var string Tool title */
17 var $title = '';
18
19
20 /** @var string Dashicon slug */
21 var $icon = '';
22
23
24 /** @var boolean Redirect form to single */
25 // var $redirect = false;
26
27
28 /**
29 * get_name
30 *
31 * This function will return the Tool's name
32 *
33 * @date 19/10/17
34 * @since ACF 5.6.3
35 *
36 * @param n/a
37 * @return n/a
38 */
39 function get_name() {
40 return $this->name;
41 }
42
43
44 /**
45 * get_title
46 *
47 * This function will return the Tool's title
48 *
49 * @date 19/10/17
50 * @since ACF 5.6.3
51 *
52 * @param n/a
53 * @return n/a
54 */
55 function get_title() {
56 return $this->title;
57 }
58
59
60 /**
61 * get_url
62 *
63 * This function will return the Tool's title
64 *
65 * @date 19/10/17
66 * @since ACF 5.6.3
67 *
68 * @param n/a
69 * @return n/a
70 */
71 function get_url() {
72 return acf_get_admin_tool_url( $this->name );
73 }
74
75
76 /**
77 * is_active
78 *
79 * This function will return true if the tool is active
80 *
81 * @date 19/10/17
82 * @since ACF 5.6.3
83 *
84 * @param n/a
85 * @return boolean
86 */
87 function is_active() {
88 return acf_maybe_get_GET( 'tool' ) === $this->name;
89 }
90
91
92 /**
93 * This function will setup the class functionality
94 *
95 * @type function
96 * @date 27/6/17
97 * @since ACF 5.6.0
98 *
99 * @param n/a
100 * @return n/a
101 */
102 function __construct() {
103
104 // initialize
105 $this->initialize();
106 }
107
108
109 /**
110 * initialize
111 *
112 * This function will initialize the admin tool
113 *
114 * @date 10/10/17
115 * @since ACF 5.6.3
116 *
117 * @param n/a
118 * @return n/a
119 */
120 function initialize() {
121
122 /* do nothing */
123 }
124
125
126
127 /**
128 * load
129 *
130 * This function is called during the admin page load
131 *
132 * @date 10/10/17
133 * @since ACF 5.6.3
134 *
135 * @param n/a
136 * @return n/a
137 */
138 function load() {
139
140 /* do nothing */
141 }
142
143
144 /**
145 * html
146 *
147 * This function will output the metabox HTML
148 *
149 * @date 10/10/17
150 * @since ACF 5.6.3
151 *
152 * @param n/a
153 * @return n/a
154 */
155 function html() {
156 }
157
158
159 /**
160 * submit
161 *
162 * This function will run when the tool's form has been submit
163 *
164 * @date 10/10/17
165 * @since ACF 5.6.3
166 *
167 * @param n/a
168 * @return n/a
169 */
170 function submit() {
171 }
172 }
173
174 endif; // class_exists check
175