@@ -27,20 +27,20 @@ discard block |
||
27 | 27 | * @since 3.9.0 |
28 | 28 | * @see WP_Debug_Data::debug_data() |
29 | 29 | */ |
30 | - static public function getSiteData( $asKeys=array() ) { |
|
31 | - $_sWPDebugClassFilePath = ABSPATH . 'wp-admin/includes/class-wp-debug-data.php'; |
|
30 | + static public function getSiteData( $asKeys = array() ) { |
|
31 | + $_sWPDebugClassFilePath = ABSPATH.'wp-admin/includes/class-wp-debug-data.php'; |
|
32 | 32 | if ( file_exists( $_sWPDebugClassFilePath ) ) { |
33 | 33 | include_once( $_sWPDebugClassFilePath ); |
34 | 34 | } |
35 | - if ( ! class_exists( 'WP_Debug_Data' ) ) { |
|
35 | + if ( !class_exists( 'WP_Debug_Data' ) ) { |
|
36 | 36 | return array(); |
37 | 37 | } |
38 | 38 | try { |
39 | - $_mCache = self::getObjectCache( __CLASS__ . '::' . __METHOD__ ); |
|
40 | - $_aDebugData = ! isset( $_mCache ) |
|
39 | + $_mCache = self::getObjectCache( __CLASS__.'::'.__METHOD__ ); |
|
40 | + $_aDebugData = !isset( $_mCache ) |
|
41 | 41 | ? WP_Debug_Data::debug_data() |
42 | 42 | : $_mCache; |
43 | - self::setObjectCache( __CLASS__ . '::' . __METHOD__, $_aDebugData ); |
|
43 | + self::setObjectCache( __CLASS__.'::'.__METHOD__, $_aDebugData ); |
|
44 | 44 | return empty( $asKeys ) |
45 | 45 | ? $_aDebugData |
46 | 46 | : self::getElement( $_aDebugData, $asKeys ); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * @since 3.5.3 |
85 | 85 | * @return string The site language. |
86 | 86 | */ |
87 | - static public function getSiteLanguage( $sDefault='en_US' ) { |
|
87 | + static public function getSiteLanguage( $sDefault = 'en_US' ) { |
|
88 | 88 | return defined( 'WPLANG' ) && WPLANG ? WPLANG : $sDefault; |
89 | 89 | } |
90 | 90 |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | : @mysql_get_server_info(), |
43 | 43 | ); |
44 | 44 | |
45 | - foreach( ( array ) $wpdb->get_results( "SHOW VARIABLES", ARRAY_A ) as $_iIndex => $_aItem ) { |
|
45 | + foreach ( ( array ) $wpdb->get_results( "SHOW VARIABLES", ARRAY_A ) as $_iIndex => $_aItem ) { |
|
46 | 46 | $_aItem = array_values( $_aItem ); |
47 | 47 | $_sKey = array_shift( $_aItem ); |
48 | 48 | $_sValue = array_shift( $_aItem ); |
@@ -71,9 +71,9 @@ discard block |
||
71 | 71 | * @since 3.4.6 |
72 | 72 | * @return string |
73 | 73 | */ |
74 | - static public function getMySQLErrorLog( $iLines=1 ) { |
|
74 | + static public function getMySQLErrorLog( $iLines = 1 ) { |
|
75 | 75 | $_sLog = self::getFileTailContents( self::getMySQLErrorLogPath(), $iLines ); |
76 | - return $_sLog ? $_sLog : ''; // @todo If empty, return an alternative. |
|
76 | + return $_sLog ? $_sLog : ''; // @todo If empty, return an alternative. |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | } |
80 | 80 | \ No newline at end of file |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @param string $sSetUpHook The action hook name for the setUp callback. Default 'plugins_loaded'. |
128 | 128 | * @param integer|float $iPriority The priority. Set a lower number to get loader earlier. Default: `10`. |
129 | 129 | */ |
130 | - public function __construct( $sPluginFilePath, $sPluginHookPrefix='', $sSetUpHook='plugins_loaded', $iPriority=10 ) { |
|
130 | + public function __construct( $sPluginFilePath, $sPluginHookPrefix = '', $sSetUpHook = 'plugins_loaded', $iPriority = 10 ) { |
|
131 | 131 | |
132 | 132 | // Check if it has been loaded. |
133 | 133 | if ( $this->_hasLoaded() ) { |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | register_deactivation_hook( $this->sFilePath, array( $this, 'replyToPluginDeactivation' ) ); |
164 | 164 | |
165 | 165 | // Schedule to load plugin specific components. |
166 | - if ( ! $this->sSetUpHook || did_action( $this->sSetUpHook ) ) { |
|
166 | + if ( !$this->sSetUpHook || did_action( $this->sSetUpHook ) ) { |
|
167 | 167 | $this->_replyToLoadPluginComponents(); |
168 | 168 | } else { |
169 | 169 | add_action( $this->sSetUpHook, array( $this, '_replyToLoadPluginComponents' ), $this->iPriority ); |
@@ -204,14 +204,14 @@ discard block |
||
204 | 204 | protected function _registerClasses() { |
205 | 205 | |
206 | 206 | // This class should be used in the framework bootstrap so disabling the auto-load option for performance. |
207 | - if ( ! class_exists( 'AdminPageFramework_RegisterClasses', false ) ) { |
|
207 | + if ( !class_exists( 'AdminPageFramework_RegisterClasses', false ) ) { |
|
208 | 208 | return; |
209 | 209 | } |
210 | 210 | |
211 | 211 | // Register classes |
212 | 212 | new AdminPageFramework_RegisterClasses( |
213 | - $this->getScanningDirs(), // scanning directory paths |
|
214 | - array(), // autoloader options |
|
213 | + $this->getScanningDirs(), // scanning directory paths |
|
214 | + array(), // autoloader options |
|
215 | 215 | $this->getClasses() // pre-generated class list |
216 | 216 | ); |
217 | 217 |
@@ -163,7 +163,7 @@ |
||
163 | 163 | register_deactivation_hook( $this->sFilePath, array( $this, 'replyToPluginDeactivation' ) ); |
164 | 164 | |
165 | 165 | // Schedule to load plugin specific components. |
166 | - if ( ! $this->sSetUpHook || did_action( $this->sSetUpHook ) ) { |
|
166 | + if ( ! $this->sSetUpHook || did_action( $this->sSetUpHook ) ) { |
|
167 | 167 | $this->_replyToLoadPluginComponents(); |
168 | 168 | } else { |
169 | 169 | add_action( $this->sSetUpHook, array( $this, '_replyToLoadPluginComponents' ), $this->iPriority ); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | * If accessed from a console, include the registry class to load 'AdminPageFramework_Registry_Base'. |
12 | 12 | */ |
13 | 13 | if ( php_sapi_name() === 'cli' ) { |
14 | - $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ) . '/admin-page-framework.php'; |
|
14 | + $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ).'/admin-page-framework.php'; |
|
15 | 15 | if ( file_exists( $_sFrameworkFilePath ) ) { |
16 | 16 | include_once( $_sFrameworkFilePath ); |
17 | 17 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @package AdminPageFramework |
11 | 11 | */ |
12 | 12 | |
13 | -if ( ! class_exists( 'AdminPageFramework_Registry', false ) ) : |
|
13 | +if ( !class_exists( 'AdminPageFramework_Registry', false ) ) : |
|
14 | 14 | /** |
15 | 15 | * Facilitates WordPress plugin and theme development. |
16 | 16 | * |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | final class AdminPageFramework_Registry extends AdminPageFramework_Registry_Base { |
62 | 62 | |
63 | 63 | const TEXT_DOMAIN = 'admin-page-framework'; |
64 | - const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
64 | + const TEXT_DOMAIN_PATH = '/language'; // not used at the moment |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * Indicates whether the framework is loaded from the minified version or not. |
@@ -108,10 +108,10 @@ discard block |
||
108 | 108 | /** |
109 | 109 | * Sets up static properties. |
110 | 110 | */ |
111 | - static public function setUp( $sFilePath=__FILE__ ) { |
|
111 | + static public function setUp( $sFilePath = __FILE__ ) { |
|
112 | 112 | self::$sFilePath = $sFilePath; |
113 | 113 | self::$sDirPath = dirname( self::$sFilePath ); |
114 | - self::$sClassMapPath = self::$sDirPath . '/admin-page-framework-class-map.php'; |
|
114 | + self::$sClassMapPath = self::$sDirPath.'/admin-page-framework-class-map.php'; |
|
115 | 115 | self::$aClassFiles = include( self::$sClassMapPath ); |
116 | 116 | self::$sAutoLoaderPath = isset( self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] ) |
117 | 117 | ? self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] |
@@ -128,11 +128,11 @@ discard block |
||
128 | 128 | */ |
129 | 129 | static public function getVersion() { |
130 | 130 | |
131 | - if ( ! isset( self::$sAutoLoaderPath ) ) { |
|
132 | - trigger_error( self::NAME . ': ' . ' : ' . sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
131 | + if ( !isset( self::$sAutoLoaderPath ) ) { |
|
132 | + trigger_error( self::NAME.': '.' : '.sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING ); |
|
133 | 133 | return self::VERSION; |
134 | 134 | } |
135 | - $_aMinifiedVersionSuffix = array( |
|
135 | + $_aMinifiedVersionSuffix = array( |
|
136 | 136 | 0 => '', |
137 | 137 | 1 => '.min', |
138 | 138 | ); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | endif; |
163 | 163 | |
164 | -if ( ! class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
164 | +if ( !class_exists( 'AdminPageFramework_Bootstrap', false ) ) : |
|
165 | 165 | /** |
166 | 166 | * Loads the Admin Page Framework library. |
167 | 167 | * |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | public function __construct( $sLibraryPath ) { |
183 | 183 | |
184 | 184 | // Singleton |
185 | - if ( ! $this->___isLoadable() ) { |
|
185 | + if ( !$this->___isLoadable() ) { |
|
186 | 186 | return; |
187 | 187 | } |
188 | 188 |