PluginProbe
PixTypes / trunk
PixTypes vtrunk
2.0.2 trunk 1.3.5 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.16 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 2.0.0 2.0.1
pixtypes / plugin-config.php

plugin-config.php in PixTypes trunk, at plugin-config.php

70 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php defined( 'ABSPATH' ) or die;
2
3 $basepath = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
4
5 $debug = defined( 'WP_DEBUG' ) && WP_DEBUG;
6
7 $options = get_option( 'pixtypes_settings' );
8
9 $display_settings = false;
10
11 if ( isset( $options['display_settings'] ) ) {
12 $display_settings = $options['display_settings'];
13 }
14
15 return array(
16 'plugin-name' => 'pixtypes',
17
18 'settings-key' => 'pixtypes_settings',
19
20 'textdomain' => 'pixtypes',
21
22 'template-paths' => array(
23 $basepath . 'core/views/form-partials/',
24 $basepath . 'views/form-partials/',
25 ),
26
27 'fields' => array(
28 'hiddens'
29 => include 'settings/hiddens' . PIXTYPES_EXT,
30 'post_types'
31 => include 'settings/post_types' . PIXTYPES_EXT,
32 'taxonomies'
33 => include 'settings/taxonomies' . PIXTYPES_EXT,
34 ),
35
36 'processor' => array(
37 // callback signature: (array $input, PixtypesProcessor $processor)
38
39 'preupdate' => array(
40 // callbacks to run before update process
41 // cleanup and validation has been performed on data
42 ),
43 'postupdate' => array(
44 'save_settings'
45 ),
46 ),
47
48 'cleanup' => array(
49 'switch' => array( 'switch_not_available' ),
50 ),
51
52 'checks' => array(
53 'counter' => array( 'is_numeric', 'not_empty' ),
54 ),
55
56 'errors' => array(
57 'not_empty' => esc_html__( 'Invalid Value.', 'pixtypes' ),
58 ),
59
60 'callbacks' => array(
61 'save_settings' => 'save_pixtypes_settings'
62 ),
63
64 'display_settings' => $display_settings,
65
66 // shows exception traces on error
67 'debug' => $debug,
68
69 ); # config
70