@@ -22,32 +22,32 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * The absolute server path to the fields API directory. |
24 | 24 | */ |
25 | -define( 'WP_FIELDS_API_DIR', plugin_dir_path( __FILE__ ) ); |
|
25 | +define('WP_FIELDS_API_DIR', plugin_dir_path(__FILE__)); |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * On `plugins_loaded`, create an instance of the Fields API manager class. |
29 | 29 | */ |
30 | 30 | function _wp_fields_api_include() { |
31 | 31 | |
32 | - require_once( WP_FIELDS_API_DIR . 'implementation/wp-includes/fields-api/class-wp-fields-api.php' ); |
|
32 | + require_once(WP_FIELDS_API_DIR.'implementation/wp-includes/fields-api/class-wp-fields-api.php'); |
|
33 | 33 | |
34 | 34 | // Init Fields API class |
35 | 35 | $GLOBALS['wp_fields'] = WP_Fields_API::get_instance(); |
36 | 36 | |
37 | 37 | } |
38 | 38 | |
39 | -add_action( 'plugins_loaded', '_wp_fields_api_include', 8 ); |
|
39 | +add_action('plugins_loaded', '_wp_fields_api_include', 8); |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Implement Fields API Customizer instead of WP Core Customizer. |
43 | 43 | */ |
44 | 44 | function _wp_fields_api_customize_include() { |
45 | 45 | |
46 | - if ( ! ( ( isset( $_REQUEST['wp_customize'] ) && 'on' == $_REQUEST['wp_customize'] ) || ( is_admin() && 'customize.php' == basename( $_SERVER['PHP_SELF'] ) ) ) ) { |
|
46 | + if ( ! ((isset($_REQUEST['wp_customize']) && 'on' == $_REQUEST['wp_customize']) || (is_admin() && 'customize.php' == basename($_SERVER['PHP_SELF'])))) { |
|
47 | 47 | return; |
48 | 48 | } |
49 | 49 | |
50 | - require_once( WP_FIELDS_API_DIR . 'implementation/wp-includes/class-wp-customize-manager.php' ); |
|
50 | + require_once(WP_FIELDS_API_DIR.'implementation/wp-includes/class-wp-customize-manager.php'); |
|
51 | 51 | |
52 | 52 | // Init Customize class |
53 | 53 | $GLOBALS['wp_customize'] = new WP_Customize_Manager; |
@@ -64,33 +64,33 @@ discard block |
||
64 | 64 | |
65 | 65 | static $overridden; |
66 | 66 | |
67 | - if ( empty( $overridden ) ) { |
|
67 | + if (empty($overridden)) { |
|
68 | 68 | $overridden = true; |
69 | 69 | |
70 | 70 | // Load our overrides |
71 | 71 | //require_once( WP_FIELDS_API_DIR . 'implementation/wp-admin/includes/user.php' ); |
72 | - require_once( WP_FIELDS_API_DIR . 'implementation/wp-admin/user-edit.php' ); |
|
72 | + require_once(WP_FIELDS_API_DIR.'implementation/wp-admin/user-edit.php'); |
|
73 | 73 | |
74 | 74 | // Bail on original core file, don't run the rest |
75 | 75 | exit; |
76 | 76 | } |
77 | 77 | |
78 | 78 | } |
79 | -add_action( 'load-user-edit.php', '_wp_fields_api_user_edit_include' ); |
|
80 | -add_action( 'load-profile.php', '_wp_fields_api_user_edit_include' ); |
|
79 | +add_action('load-user-edit.php', '_wp_fields_api_user_edit_include'); |
|
80 | +add_action('load-profile.php', '_wp_fields_api_user_edit_include'); |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * Include User Edit Implementation |
84 | 84 | */ |
85 | 85 | function _wp_fields_api_user_edit_implementation() { |
86 | 86 | |
87 | - require_once( WP_FIELDS_API_DIR . 'implementation/wp-includes/fields-api/implementations/class-wp-fields-api-user-profile.php' ); |
|
87 | + require_once(WP_FIELDS_API_DIR.'implementation/wp-includes/fields-api/implementations/class-wp-fields-api-user-profile.php'); |
|
88 | 88 | |
89 | 89 | // Run user profile implementation |
90 | 90 | WP_Fields_API_User_Profile::get_instance(); |
91 | 91 | |
92 | 92 | } |
93 | -add_action( 'fields_register', '_wp_fields_api_user_edit_implementation' ); |
|
93 | +add_action('fields_register', '_wp_fields_api_user_edit_implementation'); |
|
94 | 94 | |
95 | 95 | |
96 | 96 | /** |
@@ -99,32 +99,32 @@ discard block |
||
99 | 99 | function _wp_fields_api_term_add_include() { |
100 | 100 | static $overridden; |
101 | 101 | |
102 | - if ( empty( $overridden ) ) { |
|
102 | + if (empty($overridden)) { |
|
103 | 103 | $overridden = true; |
104 | 104 | |
105 | 105 | // Load our overrides |
106 | - require_once( WP_FIELDS_API_DIR . 'implementation/wp-admin/edit-tags.php' ); |
|
106 | + require_once(WP_FIELDS_API_DIR.'implementation/wp-admin/edit-tags.php'); |
|
107 | 107 | |
108 | 108 | // Bail on original core file, don't run the rest |
109 | 109 | exit; |
110 | 110 | } |
111 | 111 | } |
112 | -add_action( 'load-edit-tags.php', '_wp_fields_api_term_add_include' ); |
|
112 | +add_action('load-edit-tags.php', '_wp_fields_api_term_add_include'); |
|
113 | 113 | |
114 | 114 | /** |
115 | 115 | * Include Term Edit Implementation |
116 | 116 | */ |
117 | 117 | function _wp_fields_api_term_edit_implementation() { |
118 | 118 | |
119 | - if( ! isset( $_GET['action' ] ) || 'edit' !== $_GET['action'] ) { |
|
119 | + if ( ! isset($_GET['action']) || 'edit' !== $_GET['action']) { |
|
120 | 120 | // Run user profile implementation |
121 | - require_once( WP_FIELDS_API_DIR . 'implementation/wp-admin/includes/class-wp-fields-api-add-tags.php' ); |
|
121 | + require_once(WP_FIELDS_API_DIR.'implementation/wp-admin/includes/class-wp-fields-api-add-tags.php'); |
|
122 | 122 | new WP_Fields_API_Add_Tags(); |
123 | 123 | } else { |
124 | - require_once( WP_FIELDS_API_DIR . 'implementation/wp-admin/includes/class-wp-fields-api-edit-tags.php' ); |
|
124 | + require_once(WP_FIELDS_API_DIR.'implementation/wp-admin/includes/class-wp-fields-api-edit-tags.php'); |
|
125 | 125 | new WP_Fields_API_Edit_Tags(); |
126 | 126 | } |
127 | 127 | |
128 | 128 | exit; |
129 | 129 | } |
130 | -add_action( 'fields_register', '_wp_fields_api_term_edit_implementation' ); |
|
131 | 130 | \ No newline at end of file |
131 | +add_action('fields_register', '_wp_fields_api_term_edit_implementation'); |
|
132 | 132 | \ No newline at end of file |