forked from pixelgrade/pixproof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin-config.php
82 lines (65 loc) · 1.57 KB
/
plugin-config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php defined('ABSPATH') or die;
$basepath = dirname(__FILE__).DIRECTORY_SEPARATOR;
$debug = false;
if ( isset( $_GET['debug'] ) && $_GET['debug'] == 'true' ) {
$debug = true;
}
$debug = true;
$options = get_option('pixproof_settings');
$display_settings = false;
if ( isset( $options['display_settings'] ) ){
$display_settings = $options['display_settings'];
}
return array
(
'plugin-name' => 'pixproof',
'settings-key' => 'pixproof_settings',
'textdomain' => 'pixproof_txtd',
'template-paths' => array
(
$basepath.'core/views/form-partials/',
$basepath.'views/form-partials/',
),
'fields' => array
(
'hiddens'
=> include 'settings/hiddens'.EXT,
'general'
=> include 'settings/general'.EXT,
'post_types'
=> include 'settings/post_types'.EXT,
// 'taxonomies'
// => include 'settings/taxonomies'.EXT,
),
'processor' => array
(
// callback signature: (array $input, PixtypesProcessor $processor)
'preupdate' => array
(
// callbacks to run before update process
// cleanup and validation has been performed on data
),
'postupdate' => array
(
'save_settings'
),
),
'cleanup' => array
(
'switch' => array('switch_not_available'),
),
'checks' => array
(
'counter' => array('is_numeric', 'not_empty'),
),
'errors' => array
(
'not_empty' => __('Invalid Value.', pixproof::textdomain()),
),
'callbacks' => array
(
'save_settings' => 'save_proof_settings'
),
// shows exception traces on error
'debug' => $debug,
); # config