Completed
Push — master ( 6150a9...4431c0 )
by Scott Kingsley
16:49 queued 11:17
created
wordpress-fields-api.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -22,32 +22,32 @@  discard block
 block discarded – undo
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;
@@ -62,22 +62,22 @@  discard block
 block discarded – undo
62 62
  */
63 63
 function _wp_fields_api_implementations() {
64 64
 
65
-	$implementation_dir = WP_FIELDS_API_DIR . 'implementation/wp-includes/fields-api/screens/';
65
+	$implementation_dir = WP_FIELDS_API_DIR.'implementation/wp-includes/fields-api/screens/';
66 66
 
67 67
 	// User
68
-	require_once( $implementation_dir . 'class-wp-fields-api-screen-user-edit.php' );
68
+	require_once($implementation_dir.'class-wp-fields-api-screen-user-edit.php');
69 69
 
70
-	WP_Fields_API_Screen_User_Edit::register( 'user', 'user-edit' );
70
+	WP_Fields_API_Screen_User_Edit::register('user', 'user-edit');
71 71
 
72 72
 	// Term
73
-	require_once( $implementation_dir . 'class-wp-fields-api-screen-term.php' );
74
-	require_once( $implementation_dir . 'class-wp-fields-api-screen-term-add.php' );
73
+	require_once($implementation_dir.'class-wp-fields-api-screen-term.php');
74
+	require_once($implementation_dir.'class-wp-fields-api-screen-term-add.php');
75 75
 
76
-	WP_Fields_API_Screen_Term_Add::register( 'term', 'term-add' );
77
-	WP_Fields_API_Screen_Term::register( 'term', 'term-edit' );
76
+	WP_Fields_API_Screen_Term_Add::register('term', 'term-add');
77
+	WP_Fields_API_Screen_Term::register('term', 'term-edit');
78 78
 
79 79
 }
80
-add_action( 'fields_register', '_wp_fields_api_implementations' );
80
+add_action('fields_register', '_wp_fields_api_implementations');
81 81
 
82 82
 /**
83 83
  * Implement Fields API User edit to override WP Core.
@@ -86,20 +86,20 @@  discard block
 block discarded – undo
86 86
 
87 87
 	static $overridden;
88 88
 
89
-	if ( empty( $overridden ) ) {
89
+	if (empty($overridden)) {
90 90
 		$overridden = true;
91 91
 
92 92
 		// Load our overrides
93 93
 		//require_once( WP_FIELDS_API_DIR . 'implementation/wp-admin/includes/user.php' );
94
-		require_once( WP_FIELDS_API_DIR . 'implementation/wp-admin/user-edit.php' );
94
+		require_once(WP_FIELDS_API_DIR.'implementation/wp-admin/user-edit.php');
95 95
 
96 96
 		// Bail on original core file, don't run the rest
97 97
 		exit;
98 98
 	}
99 99
 
100 100
 }
101
-add_action( 'load-user-edit.php', '_wp_fields_api_user_edit_include' );
102
-add_action( 'load-profile.php', '_wp_fields_api_user_edit_include' );
101
+add_action('load-user-edit.php', '_wp_fields_api_user_edit_include');
102
+add_action('load-profile.php', '_wp_fields_api_user_edit_include');
103 103
 
104 104
 
105 105
 /**
@@ -109,15 +109,15 @@  discard block
 block discarded – undo
109 109
 
110 110
 	static $overridden;
111 111
 
112
-	if ( empty( $overridden ) ) {
112
+	if (empty($overridden)) {
113 113
 		$overridden = true;
114 114
 
115 115
 		// Load our overrides
116
-		require_once( WP_FIELDS_API_DIR . 'implementation/wp-admin/edit-tags.php' );
116
+		require_once(WP_FIELDS_API_DIR.'implementation/wp-admin/edit-tags.php');
117 117
 
118 118
 		// Bail on original core file, don't run the rest
119 119
 		exit;
120 120
 	}
121 121
 
122 122
 }
123
-add_action( 'load-edit-tags.php', '_wp_fields_api_term_include' );
124 123
\ No newline at end of file
124
+add_action('load-edit-tags.php', '_wp_fields_api_term_include');
125 125
\ No newline at end of file
Please login to merge, or discard this patch.