36
36
37
37
/**
38
38
* Initialises text domain for l10n.
39
- *
40
- * @access public
41
- * @return void
42
39
*/
43
40
function ald_acc_lang_init () {
44
41
load_plugin_textdomain ( 'autoclose ' , false , dirname ( plugin_basename ( __FILE__ ) ) . '/languages/ ' );
@@ -163,8 +160,7 @@ function ald_acc() {
163
160
/**
164
161
* Default options.
165
162
*
166
- * @access public
167
- * @return void
163
+ * @return array Default settings
168
164
*/
169
165
function acc_default_options () {
170
166
@@ -188,15 +184,14 @@ function acc_default_options() {
188
184
'pbtb_post_types ' => $ pbtb_post_types , // WordPress custom post types
189
185
);
190
186
191
- return $ acc_settings ;
187
+ return apply_filters ( ' acc_default_options ' , $ acc_settings ) ;
192
188
}
193
189
194
190
195
191
/**
196
192
* Function to read options from the database.
197
193
*
198
- * @access public
199
- * @return void
194
+ * @return array Options for the database. Will add any missing options.
200
195
*/
201
196
function acc_read_options () {
202
197
$ acc_settings_changed = false ;
@@ -216,17 +211,15 @@ function acc_read_options() {
216
211
update_option ( 'ald_acc_settings ' , $ acc_settings );
217
212
}
218
213
219
- return $ acc_settings ;
214
+ return apply_filters ( ' acc_read_options ' , $ acc_settings ) ;
220
215
}
221
216
222
217
223
218
/**
224
219
* Function to enable run or actions.
225
220
*
226
- * @access public
227
- * @param int $hour
228
- * @param int $min
229
- * @return void
221
+ * @param int $hour Hour
222
+ * @param int $min Min
230
223
*/
231
224
function acc_enable_run ( $ hour , $ min ) {
232
225
if ( ! wp_next_scheduled ( 'ald_acc_hook ' ) ) {
@@ -240,9 +233,6 @@ function acc_enable_run( $hour, $min ) {
240
233
241
234
/**
242
235
* Function to disable daily run or actions.
243
- *
244
- * @access public
245
- * @return void
246
236
*/
247
237
function acc_disable_run () {
248
238
if ( wp_next_scheduled ( 'ald_acc_hook ' ) ) {
@@ -254,10 +244,10 @@ function acc_disable_run() {
254
244
// Process the admin page if we're on the admin screen
255
245
if ( is_admin () || strstr ( $ _SERVER ['PHP_SELF ' ], 'wp-admin/ ' ) ) {
256
246
require_once ( ALD_ACC_DIR . "/admin.inc.php " );
247
+
257
248
/**
258
249
* Filter to add link to WordPress plugin action links.
259
250
*
260
- * @access public
261
251
* @param array $links
262
252
* @return array
263
253
*/
@@ -273,10 +263,8 @@ function acc_plugin_actions_links( $links ) {
273
263
/**
274
264
* Filter to add links to the plugin action row.
275
265
*
276
- * @access public
277
266
* @param array $links
278
267
* @param array $file
279
- * @return void
280
268
*/
281
269
function acc_plugin_actions ( $ links , $ file ) {
282
270
static $ plugin ;
@@ -289,13 +277,7 @@ function acc_plugin_actions( $links, $file ) {
289
277
}
290
278
return $ links ;
291
279
}
292
-
293
- global $ wp_version ;
294
- if ( version_compare ( $ wp_version , '2.8alpha ' , '> ' ) ) {
295
- add_filter ( 'plugin_row_meta ' , 'acc_plugin_actions ' , 10 , 2 ); // only 2.8 and higher
296
- } else {
297
- add_filter ( 'plugin_action_links ' , 'acc_plugin_actions ' , 10 , 2 );
298
- }
280
+ add_filter ( 'plugin_row_meta ' , 'acc_plugin_actions ' , 10 , 2 ); // only 2.8 and higher
299
281
300
282
} // End admin.inc
301
283
0 commit comments