@@ -31,15 +31,15 @@ |
||
31 | 31 | 'page_slug' => null, |
32 | 32 | 'tab_slug' => null, |
33 | 33 | 'title' => null, |
34 | - 'order' => 10, // (integer) |
|
35 | - 'show_in_page_tab' => true, // 3.6.0+ (boolean) |
|
36 | - 'parent_tab_slug' => null, // this needs to be set if the above show_in_page_tab is false so that the framework can mark the parent tab to be active when the hidden page is accessed. |
|
37 | - 'url' => null, // 3.5.0+ This allows the user set custom link. |
|
38 | - 'disabled' => null, // 3.5.10+ (boolean) If true, the link will be unlinked. |
|
39 | - 'attributes' => null, // 3.5.10+ (array) Applies to the navigation tab bar element. |
|
40 | - 'capability' => null, // 3.6.0+ (string) |
|
41 | - 'if' => true, // 3.6.0+ (boolean) |
|
42 | - 'show_debug_info' => null, // 3.8.8+ (boolean, optional) Whether to show debug information. If not set, the existent `bShowDebugInfo` property value will be used. The initial value here is `null` as the default value will be assigned in the formatting method. |
|
34 | + 'order' => 10, // (integer) |
|
35 | + 'show_in_page_tab' => true, // 3.6.0+ (boolean) |
|
36 | + 'parent_tab_slug' => null, // this needs to be set if the above show_in_page_tab is false so that the framework can mark the parent tab to be active when the hidden page is accessed. |
|
37 | + 'url' => null, // 3.5.0+ This allows the user set custom link. |
|
38 | + 'disabled' => null, // 3.5.10+ (boolean) If true, the link will be unlinked. |
|
39 | + 'attributes' => null, // 3.5.10+ (array) Applies to the navigation tab bar element. |
|
40 | + 'capability' => null, // 3.6.0+ (string) |
|
41 | + 'if' => true, // 3.6.0+ (boolean) |
|
42 | + 'show_debug_info' => null, // 3.8.8+ (boolean, optional) Whether to show debug information. If not set, the existent `bShowDebugInfo` property value will be used. The initial value here is `null` as the default value will be assigned in the formatting method. |
|
43 | 43 | ); |
44 | 44 | |
45 | 45 | /** |
@@ -42,11 +42,11 @@ |
||
42 | 42 | */ |
43 | 43 | public static function instantiate( $oProp, $oMsg ) { |
44 | 44 | |
45 | - if ( ! is_network_admin() ) { |
|
45 | + if ( ! is_network_admin() ) { |
|
46 | 46 | return; |
47 | 47 | } |
48 | 48 | |
49 | - if ( in_array( $oProp->sClassName, self::$aClassNames ) ) { |
|
49 | + if ( in_array( $oProp->sClassName, self::$aClassNames ) ) { |
|
50 | 50 | return self::$_oInstance; |
51 | 51 | } |
52 | 52 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public static function instantiate( $oProp, $oMsg ) { |
43 | 43 | |
44 | - if ( ! is_network_admin() ) { |
|
44 | + if ( !is_network_admin() ) { |
|
45 | 45 | return; |
46 | 46 | } |
47 | 47 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | return self::$_oInstance; |
50 | 50 | } |
51 | 51 | |
52 | - self::$aClassNames[] = $oProp->sClassName; |
|
52 | + self::$aClassNames[ ] = $oProp->sClassName; |
|
53 | 53 | self::$_oInstance = new AdminPageFramework_PageLoadInfo_network_admin_page( $oProp, $oMsg ); |
54 | 54 | |
55 | 55 | return self::$_oInstance; |
@@ -24,12 +24,12 @@ |
||
24 | 24 | * @since 3.0.0 |
25 | 25 | * @deprecated 3.7.0 Use `AdminPageFramework_PageMetaBox` instead. |
26 | 26 | */ |
27 | - public function __construct( $sMetaBoxID, $sTitle, $asPageSlugs=array(), $sContext='normal', $sPriority='default', $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
27 | + public function __construct( $sMetaBoxID, $sTitle, $asPageSlugs = array(), $sContext = 'normal', $sPriority = 'default', $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) { |
|
28 | 28 | |
29 | 29 | parent::__construct( $sMetaBoxID, $sTitle, $asPageSlugs, $sContext, $sPriority, $sCapability, $sTextDomain ); |
30 | 30 | |
31 | 31 | $this->oUtil->showDeprecationNotice( |
32 | - 'The class, ' . __CLASS__ . ',', // deprecated item |
|
32 | + 'The class, '.__CLASS__.',', // deprecated item |
|
33 | 33 | 'AdminPageFramework_PageMetaBox' // alternative |
34 | 34 | ); |
35 | 35 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | * @since 3.8.9 |
43 | 43 | * @return string |
44 | 44 | */ |
45 | - static public function getDetails( $mValue, $bEscape=true ) { |
|
45 | + static public function getDetails( $mValue, $bEscape=true ) { |
|
46 | 46 | $_sValueWithDetails = self::_getArrayRepresentationSanitized( |
47 | 47 | self::_getLegibleDetails( $mValue ) |
48 | 48 | ); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * @param string $sFilePath The file path for a log file. |
34 | 34 | * @return void |
35 | 35 | */ |
36 | - static public function dump( $asArray, $sFilePath=null ) { |
|
36 | + static public function dump( $asArray, $sFilePath = null ) { |
|
37 | 37 | echo self::get( $asArray, $sFilePath ); |
38 | 38 | } |
39 | 39 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @since 3.8.9 |
43 | 43 | * @return string |
44 | 44 | */ |
45 | - static public function getDetails( $mValue, $bEscape=true ) { |
|
45 | + static public function getDetails( $mValue, $bEscape = true ) { |
|
46 | 46 | $_sValueWithDetails = self::_getArrayRepresentationSanitized( |
47 | 47 | self::_getLegibleDetails( $mValue ) |
48 | 48 | ); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * @param string $sFilePath The file path for a log file. |
65 | 65 | * @param boolean $bEscape Whether to escape characters. |
66 | 66 | */ |
67 | - static public function get( $asArray, $sFilePath=null, $bEscape=true ) { |
|
67 | + static public function get( $asArray, $sFilePath = null, $bEscape = true ) { |
|
68 | 68 | |
69 | 69 | if ( $sFilePath ) { |
70 | 70 | self::log( $asArray, $sFilePath ); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * @param string $sFilePath The log file path. |
97 | 97 | * @return void |
98 | 98 | **/ |
99 | - static public function log( $mValue, $sFilePath=null ) { |
|
99 | + static public function log( $mValue, $sFilePath = null ) { |
|
100 | 100 | self::_log( $mValue, $sFilePath ); |
101 | 101 | } |
102 | 102 | |
@@ -110,8 +110,8 @@ discard block |
||
110 | 110 | * @since unknown |
111 | 111 | * @deprecated 3.2.0 |
112 | 112 | */ |
113 | - static public function dumpArray( $asArray, $sFilePath=null ) { |
|
114 | - self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::dump()' ); |
|
113 | + static public function dumpArray( $asArray, $sFilePath = null ) { |
|
114 | + self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::dump()' ); |
|
115 | 115 | AdminPageFramework_Debug::dump( $asArray, $sFilePath ); |
116 | 116 | } |
117 | 117 | |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | * @since 3.0.0 Changed the $bEncloseInTag parameter to bEscape. |
125 | 125 | * @deprecated 3.2.0 |
126 | 126 | */ |
127 | - static public function getArray( $asArray, $sFilePath=null, $bEscape=true ) { |
|
128 | - self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::get()' ); |
|
127 | + static public function getArray( $asArray, $sFilePath = null, $bEscape = true ) { |
|
128 | + self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::get()' ); |
|
129 | 129 | return AdminPageFramework_Debug::get( $asArray, $sFilePath, $bEscape ); |
130 | 130 | } |
131 | 131 | |
@@ -136,8 +136,8 @@ discard block |
||
136 | 136 | * @since 3.0.3 Changed the default log location and file name. |
137 | 137 | * @deprecated 3.1.0 Use the `log()` method instead. |
138 | 138 | */ |
139 | - static public function logArray( $asArray, $sFilePath=null ) { |
|
140 | - self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__, 'AdminPageFramework_Debug::log()' ); |
|
139 | + static public function logArray( $asArray, $sFilePath = null ) { |
|
140 | + self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__, 'AdminPageFramework_Debug::log()' ); |
|
141 | 141 | AdminPageFramework_Debug::log( $asArray, $sFilePath ); |
142 | 142 | } |
143 | 143 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | * @deprecated 3.8.9 |
151 | 151 | */ |
152 | 152 | static public function getAsString( $mValue ) { |
153 | - self::showDeprecationNotice( 'AdminPageFramework_Debug::' . __FUNCTION__ ); |
|
153 | + self::showDeprecationNotice( 'AdminPageFramework_Debug::'.__FUNCTION__ ); |
|
154 | 154 | return self::_getLegible( $mValue ); |
155 | 155 | } |
156 | 156 |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | * @since 3.8.9 |
23 | 23 | * @return string |
24 | 24 | */ |
25 | - static protected function _getLegibleDetails( $mValue ) { |
|
26 | - if ( is_array( $mValue ) ) { |
|
25 | + static protected function _getLegibleDetails( $mValue ) { |
|
26 | + if ( is_array( $mValue ) ) { |
|
27 | 27 | return '(array, length: ' . count( $mValue ).') ' |
28 | 28 | . print_r( self::_getLegibleArray( $mValue ) , true ); |
29 | 29 | } |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | * @return mixed A modified value. |
263 | 263 | * @since 3.8.9 |
264 | 264 | */ |
265 | - static private function _getArrayMappedNested( $mItem ) { |
|
265 | + static private function _getArrayMappedNested( $mItem ) { |
|
266 | 266 | return is_array( $mItem ) |
267 | 267 | ? array_map( array( __CLASS__, '_getArrayMappedNested' ), $mItem ) |
268 | 268 | : call_user_func( self::$_oCurrentCallableForArrayMapRecursive, $mItem ); |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | */ |
27 | 27 | static protected function _getLegibleDetails( $mValue ) { |
28 | 28 | if ( is_array( $mValue ) ) { |
29 | - return '(array, length: ' . count( $mValue ).') ' |
|
30 | - . print_r( self::_getLegibleArray( $mValue ) , true ); |
|
29 | + return '(array, length: '.count( $mValue ).') ' |
|
30 | + . print_r( self::_getLegibleArray( $mValue ), true ); |
|
31 | 31 | } |
32 | 32 | return print_r( self::_getLegibleValue( $mValue ), true ); |
33 | 33 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | static private function _getObjectName( $mItem ) { |
65 | 65 | if ( is_object( $mItem ) ) { |
66 | - return '(object) ' . get_class( $mItem ); |
|
66 | + return '(object) '.get_class( $mItem ); |
|
67 | 67 | } |
68 | 68 | return $mItem; |
69 | 69 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * @return string |
75 | 75 | */ |
76 | 76 | static private function _getLegibleCallable( $asoCallable ) { |
77 | - return '(callable) ' . self::_getCallableName( $asoCallable ); |
|
77 | + return '(callable) '.self::_getCallableName( $asoCallable ); |
|
78 | 78 | } |
79 | 79 | /** |
80 | 80 | * @since 3.8.9 |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | ? get_class( $asoCallable[ 0 ] ) |
94 | 94 | : ( string ) $asoCallable[ 0 ]; |
95 | 95 | |
96 | - return $_sSubject . '::' . ( string ) $asoCallable[ 1 ]; |
|
96 | + return $_sSubject.'::'.( string ) $asoCallable[ 1 ]; |
|
97 | 97 | |
98 | 98 | } |
99 | 99 | |
@@ -107,8 +107,8 @@ discard block |
||
107 | 107 | if ( method_exists( $oObject, '__toString' ) ) { |
108 | 108 | return ( string ) $oObject; |
109 | 109 | } |
110 | - return '(object) ' . get_class( $oObject ) . ' ' |
|
111 | - . count( get_object_vars( $oObject ) ) . ' properties.'; |
|
110 | + return '(object) '.get_class( $oObject ).' ' |
|
111 | + . count( get_object_vars( $oObject ) ).' properties.'; |
|
112 | 112 | |
113 | 113 | } |
114 | 114 | /** |
@@ -146,12 +146,12 @@ discard block |
||
146 | 146 | return '(null)'; |
147 | 147 | } |
148 | 148 | if ( is_object( $mNonScalar ) ) { |
149 | - return '(' . $_sType . ') ' . get_class( $mNonScalar ); |
|
149 | + return '('.$_sType.') '.get_class( $mNonScalar ); |
|
150 | 150 | } |
151 | 151 | if ( is_array( $mNonScalar ) ) { |
152 | - return '(' . $_sType . ') ' . count( $mNonScalar ) . ' elements'; |
|
152 | + return '('.$_sType.') '.count( $mNonScalar ).' elements'; |
|
153 | 153 | } |
154 | - return '(' . $_sType . ') ' . ( string ) $mNonScalar; |
|
154 | + return '('.$_sType.') '.( string ) $mNonScalar; |
|
155 | 155 | |
156 | 156 | } |
157 | 157 | /** |
@@ -161,11 +161,11 @@ discard block |
||
161 | 161 | */ |
162 | 162 | static private function _getLegibleScalar( $sScalar ) { |
163 | 163 | if ( is_bool( $sScalar ) ) { |
164 | - return '(boolean) ' . ( $sScalar ? 'true' : 'false' ); |
|
164 | + return '(boolean) '.( $sScalar ? 'true' : 'false' ); |
|
165 | 165 | } |
166 | 166 | return is_string( $sScalar ) |
167 | 167 | ? self::_getLegibleString( $sScalar ) |
168 | - : '(' . gettype( $sScalar ) . ', length: ' . self::_getValueLength( $sScalar ) . ') ' . $sScalar; |
|
168 | + : '('.gettype( $sScalar ).', length: '.self::_getValueLength( $sScalar ).') '.$sScalar; |
|
169 | 169 | } |
170 | 170 | /** |
171 | 171 | * Returns a length of a value. |
@@ -198,8 +198,8 @@ discard block |
||
198 | 198 | $iCharLimit = self::$iLegibleStringCharacterLimit; |
199 | 199 | $_iCharLength = call_user_func_array( $_aStrLenMethod[ $_iMBSupport ], array( $sString ) ); |
200 | 200 | return $_iCharLength <= $iCharLimit |
201 | - ? '(string, length: ' . $_iCharLength . ') ' . $sString |
|
202 | - : '(string, length: ' . $_iCharLength . ') ' . call_user_func_array( $_aSubstrMethod[ $_iMBSupport ], array( $sString, 0, $iCharLimit ) ) |
|
201 | + ? '(string, length: '.$_iCharLength.') '.$sString |
|
202 | + : '(string, length: '.$_iCharLength.') '.call_user_func_array( $_aSubstrMethod[ $_iMBSupport ], array( $sString, 0, $iCharLimit ) ) |
|
203 | 203 | . '...'; |
204 | 204 | |
205 | 205 | } |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | * @return array |
243 | 243 | * @internal |
244 | 244 | */ |
245 | - static private function _getSlicedByDepth( array $aSubject, $iDepth=0 ) { |
|
245 | + static private function _getSlicedByDepth( array $aSubject, $iDepth = 0 ) { |
|
246 | 246 | |
247 | 247 | foreach ( $aSubject as $_sKey => $_vValue ) { |
248 | 248 | if ( is_array( $_vValue ) ) { |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @since 3.8.9 |
26 | 26 | * @return void |
27 | 27 | **/ |
28 | - static protected function _log( $mValue, $sFilePath=null ) { |
|
28 | + static protected function _log( $mValue, $sFilePath = null ) { |
|
29 | 29 | |
30 | 30 | static $_fPreviousTimeStamp = 0; |
31 | 31 | |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | round( $_fCurrentTimeStamp - $_fPreviousTimeStamp, 3 ), // elapsed time |
54 | 54 | $_sCallerClass, |
55 | 55 | $_sCallerFunction |
56 | - ) . PHP_EOL |
|
57 | - . self::_getLegibleDetails( $mValue ) . PHP_EOL . PHP_EOL; |
|
56 | + ).PHP_EOL |
|
57 | + . self::_getLegibleDetails( $mValue ).PHP_EOL.PHP_EOL; |
|
58 | 58 | } |
59 | 59 | /** |
60 | 60 | * @since 3.8.9 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | static private function _getCallerFunctionName( $oCallerInfo ) { |
64 | 64 | return self::getElement( |
65 | - $oCallerInfo, // subject array |
|
65 | + $oCallerInfo, // subject array |
|
66 | 66 | array( 1, 'function' ), // key |
67 | 67 | '' // default |
68 | 68 | ); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | static private function _getCallerClassName( $oCallerInfo ) { |
75 | 75 | return self::getElement( |
76 | - $oCallerInfo, // subject array |
|
76 | + $oCallerInfo, // subject array |
|
77 | 77 | array( 1, 'class' ), // key |
78 | 78 | '' // default |
79 | 79 | ); |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | } |
93 | 93 | // Return a generated default log path. |
94 | 94 | if ( true === $bsFilePath ) { |
95 | - return WP_CONTENT_DIR . DIRECTORY_SEPARATOR . basename( get_class() ) . '_' . date( "Ymd" ) . '.log'; |
|
95 | + return WP_CONTENT_DIR.DIRECTORY_SEPARATOR.basename( get_class() ).'_'.date( "Ymd" ).'.log'; |
|
96 | 96 | } |
97 | - return WP_CONTENT_DIR . DIRECTORY_SEPARATOR . basename( get_class() ) . '_' . basename( $sCallerClass ) . '_' . date( "Ymd" ) . '.log'; |
|
97 | + return WP_CONTENT_DIR.DIRECTORY_SEPARATOR.basename( get_class() ).'_'.basename( $sCallerClass ).'_'.date( "Ymd" ).'.log'; |
|
98 | 98 | |
99 | 99 | } |
100 | 100 | /** |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * @internal |
104 | 104 | */ |
105 | 105 | static private function _createFile( $sFilePath ) { |
106 | - if ( ! $sFilePath || true === $sFilePath ) { |
|
106 | + if ( !$sFilePath || true === $sFilePath ) { |
|
107 | 107 | return false; |
108 | 108 | } |
109 | 109 | if ( file_exists( $sFilePath ) ) { |
@@ -125,11 +125,11 @@ discard block |
||
125 | 125 | $_nNow = $fCurrentTimeStamp + ( self::_getSiteGMTOffset() * 60 * 60 ); |
126 | 126 | $_nMicroseconds = str_pad( round( ( $_nNow - floor( $_nNow ) ) * 10000 ), 4, '0' ); |
127 | 127 | $_aOutput = array( |
128 | - date( "Y/m/d H:i:s", $_nNow ) . '.' . $_nMicroseconds, |
|
128 | + date( "Y/m/d H:i:s", $_nNow ).'.'.$_nMicroseconds, |
|
129 | 129 | self::_getFormattedElapsedTime( $nElapsed ), |
130 | 130 | self::_getPageLoadID(), |
131 | 131 | self::getFrameworkVersion(), |
132 | - $sCallerClass . '::' . $sCallerFunction, |
|
132 | + $sCallerClass.'::'.$sCallerFunction, |
|
133 | 133 | current_filter(), |
134 | 134 | self::getCurrentURL(), |
135 | 135 | ); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | static private function _getSiteGMTOffset() { |
146 | 146 | static $_nGMTOffset; |
147 | - $_nGMTOffset = isset( $_nGMTOffset ) |
|
147 | + $_nGMTOffset = isset( $_nGMTOffset ) |
|
148 | 148 | ? $_nGMTOffset |
149 | 149 | : get_option( 'gmt_offset' ); |
150 | 150 | return $_nGMTOffset; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | */ |
156 | 156 | static private function _getPageLoadID() { |
157 | 157 | static $_iPageLoadID; |
158 | - $_iPageLoadID = $_iPageLoadID |
|
158 | + $_iPageLoadID = $_iPageLoadID |
|
159 | 159 | ? $_iPageLoadID |
160 | 160 | : uniqid(); |
161 | 161 | return $_iPageLoadID; |
@@ -179,15 +179,15 @@ discard block |
||
179 | 179 | 3, |
180 | 180 | '0' |
181 | 181 | ); |
182 | - $_sElapsed = self::getElement( |
|
183 | - $_aElapsedParts, // subject array |
|
184 | - 0, // key |
|
182 | + $_sElapsed = self::getElement( |
|
183 | + $_aElapsedParts, // subject array |
|
184 | + 0, // key |
|
185 | 185 | 0 // default |
186 | 186 | ); |
187 | - $_sElapsed = strlen( $_sElapsed ) > 1 |
|
188 | - ? '+' . substr( $_sElapsed, -1, 2 ) |
|
189 | - : ' ' . $_sElapsed; |
|
190 | - return $_sElapsed . '.' . $_sElapsedFloat; |
|
187 | + $_sElapsed = strlen( $_sElapsed ) > 1 |
|
188 | + ? '+'.substr( $_sElapsed, -1, 2 ) |
|
189 | + : ' '.$_sElapsed; |
|
190 | + return $_sElapsed.'.'.$_sElapsedFloat; |
|
191 | 191 | |
192 | 192 | } |
193 | 193 |
@@ -36,10 +36,10 @@ discard block |
||
36 | 36 | * @since 3.8.4 When non-true value is passed, `0px` will be returned. |
37 | 37 | * @return string |
38 | 38 | */ |
39 | - static public function getLengthSanitized( $sLength, $sUnit='px' ) { |
|
39 | + static public function getLengthSanitized( $sLength, $sUnit = 'px' ) { |
|
40 | 40 | $sLength = $sLength ? $sLength : 0; |
41 | 41 | return is_numeric( $sLength ) |
42 | - ? $sLength . $sUnit |
|
42 | + ? $sLength.$sUnit |
|
43 | 43 | : $sLength; |
44 | 44 | } |
45 | 45 | |
@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | * @since 3.8.11 Renamed from `fixNumber()`. |
82 | 82 | * @return string|integer A numeric value will be returned. |
83 | 83 | */ |
84 | - static public function getNumberFixed( $nToFix, $nDefault, $nMin='', $nMax='' ) { |
|
84 | + static public function getNumberFixed( $nToFix, $nDefault, $nMin = '', $nMax = '' ) { |
|
85 | 85 | |
86 | - if ( ! is_numeric( trim( $nToFix ) ) ) { |
|
86 | + if ( !is_numeric( trim( $nToFix ) ) ) { |
|
87 | 87 | return $nDefault; |
88 | 88 | } |
89 | 89 | if ( $nMin !== '' && $nToFix < $nMin ) { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @return string|integer A numeric value will be returned. |
102 | 102 | * @deprecated 3.8.11 |
103 | 103 | */ |
104 | - static public function fixNumber( $nToFix, $nDefault, $nMin='', $nMax='' ) { |
|
104 | + static public function fixNumber( $nToFix, $nDefault, $nMin = '', $nMax = '' ) { |
|
105 | 105 | return self::getNumberFixed( $nToFix, $nDefault, $nMin, $nMax ); |
106 | 106 | } |
107 | 107 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | static public function getCSSMinified( $sCSSRules ) { |
116 | 116 | return str_replace( |
117 | - array( "\r\n", "\r", "\n", "\t", ' ', ' ', ' '), // remove line breaks, tab, and white sspaces. |
|
117 | + array( "\r\n", "\r", "\n", "\t", ' ', ' ', ' ' ), // remove line breaks, tab, and white sspaces. |
|
118 | 118 | '', |
119 | 119 | preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $sCSSRules ) // remove comments |
120 | 120 | ); |
@@ -151,8 +151,8 @@ discard block |
||
151 | 151 | */ |
152 | 152 | static public function getNumberOfReadableSize( $nSize ) { |
153 | 153 | |
154 | - $_nReturn = substr( $nSize, 0, -1 ); |
|
155 | - switch( strtoupper( substr( $nSize, -1 ) ) ) { |
|
154 | + $_nReturn = substr( $nSize, 0, -1 ); |
|
155 | + switch ( strtoupper( substr( $nSize, -1 ) ) ) { |
|
156 | 156 | case 'P': |
157 | 157 | $_nReturn *= 1024; |
158 | 158 | case 'T': |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $_nLog = log( $nBytes, 1024 ); |
179 | 179 | $_iPower = ( int ) $_nLog; |
180 | 180 | $_iSize = pow( 1024, $_nLog - $_iPower ); |
181 | - return $_iSize . $_aUnits[ $_iPower ]; |
|
181 | + return $_iSize.$_aUnits[ $_iPower ]; |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
@@ -192,6 +192,8 @@ |
||
192 | 192 | } |
193 | 193 | /** |
194 | 194 | * Trims a trailing sub-string if exists. |
195 | + * @param string $sString |
|
196 | + * @param string $sSuffix |
|
195 | 197 | * @return string |
196 | 198 | * @since 3.7.2 |
197 | 199 | */ |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @since 3.8.4 When non-true value is passed, `0px` will be returned. |
36 | 36 | * @return string |
37 | 37 | */ |
38 | - static public function getLengthSanitized( $sLength, $sUnit='px' ) { |
|
38 | + static public function getLengthSanitized( $sLength, $sUnit='px' ) { |
|
39 | 39 | $sLength = $sLength ? $sLength : 0; |
40 | 40 | return is_numeric( $sLength ) |
41 | 41 | ? $sLength . $sUnit |
@@ -82,13 +82,13 @@ discard block |
||
82 | 82 | */ |
83 | 83 | static public function getNumberFixed( $nToFix, $nDefault, $nMin='', $nMax='' ) { |
84 | 84 | |
85 | - if ( ! is_numeric( trim( $nToFix ) ) ) { |
|
85 | + if ( ! is_numeric( trim( $nToFix ) ) ) { |
|
86 | 86 | return $nDefault; |
87 | 87 | } |
88 | - if ( $nMin !== '' && $nToFix < $nMin ) { |
|
88 | + if ( $nMin !== '' && $nToFix < $nMin ) { |
|
89 | 89 | return $nMin; |
90 | 90 | } |
91 | - if ( $nMax !== '' && $nToFix > $nMax ) { |
|
91 | + if ( $nMax !== '' && $nToFix > $nMax ) { |
|
92 | 92 | return $nMax; |
93 | 93 | } |
94 | 94 | return $nToFix; |
@@ -1,40 +1,40 @@ |
||
1 | 1 | <?php |
2 | 2 | $_aClassFiles = array( |
3 | - "GitHubCustomFieldType"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/library/github-custom-field-type/GitHubCustomFieldType.php", |
|
4 | - "AdminPageFrameworkLoader_Bootstrap"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/AdminPageFrameworkLoader_Bootstrap.php", |
|
5 | - "AdminPageFrameworkLoader_AdminPage"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPage.php", |
|
6 | - "AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks.php", |
|
7 | - "AdminPageFrameworkLoader_AdminPageMetaBox_Notification"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_Notification.php", |
|
8 | - "AdminPageFrameworkLoader_AdminPage_Addon"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon.php", |
|
9 | - "AdminPageFrameworkLoader_AdminPage_Addon_Top"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon_Top.php", |
|
10 | - "AdminPageFrameworkLoader_AdminPage_Help"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help.php", |
|
11 | - "AdminPageFrameworkLoader_AdminPage_Help_About"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_About.php", |
|
12 | - "AdminPageFrameworkLoader_AdminPage_Help_Debug"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Debug.php", |
|
13 | - "AdminPageFrameworkLoader_AdminPage_Help_Example"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Example.php", |
|
14 | - "AdminPageFrameworkLoader_AdminPage_Help_FAQ"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_FAQ.php", |
|
15 | - "AdminPageFrameworkLoader_AdminPage_Help_Guide"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Guide.php", |
|
16 | - "AdminPageFrameworkLoader_AdminPage_Help_Information"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Information.php", |
|
17 | - "AdminPageFrameworkLoader_AdminPage_Help_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report.php", |
|
18 | - "AdminPageFrameworkLoader_AdminPage_Help_Report_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report_Report.php", |
|
19 | - "AdminPageFrameworkLoader_AdminPage_Help_Tip"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Tip.php", |
|
20 | - "AdminPageFrameworkLoader_AdminPage_Tool"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/AdminPageFrameworkLoader_AdminPage_Tool.php", |
|
21 | - "AdminPageFrameworkLoader_AdminPage_Tool_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator.php", |
|
22 | - "AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes.php", |
|
23 | - "AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator.php", |
|
24 | - "AdminPageFrameworkLoader_AdminPage_Tool_Minifier"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/minifier/AdminPageFrameworkLoader_AdminPage_Tool_Minifier.php", |
|
25 | - "AdminPageFrameworkLoader_AdminPage_Tool_Minifier_Minifier"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/admin-page-framework/tool/minifier/AdminPageFrameworkLoader_AdminPage_Tool_Minifier_Minifier.php", |
|
26 | - "AdminPageFrameworkLoader_AdminPageWelcome"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/dashboard/AdminPageFrameworkLoader_AdminPageWelcome.php", |
|
27 | - "AdminPageFrameworkLoader_AdminPageWelcome_Welcome"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/dashboard/welcome/AdminPageFrameworkLoader_AdminPageWelcome_Welcome.php", |
|
28 | - "AdminPageFrameworkLoader_Demo"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/demo/AdminPageFrameworkLoader_Demo.php", |
|
29 | - "AdminPageFrameworkLoader_NetworkAdmin"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/network-admin/AdminPageFrameworkLoader_NetworkAdmin.php", |
|
30 | - "AdminPageFrameworkLoader_AdminPage_Page_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Page_Base.php", |
|
31 | - "AdminPageFrameworkLoader_AdminPage_RootBase"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_RootBase.php", |
|
32 | - "AdminPageFrameworkLoader_AdminPage_Section_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Section_Base.php", |
|
33 | - "AdminPageFrameworkLoader_AdminPage_Tab_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_Base.php", |
|
34 | - "AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase.php", |
|
35 | - "AdminPageFrameworkLoader_Event"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/event/AdminPageFrameworkLoader_Event.php", |
|
36 | - "AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/event/AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion.php", |
|
37 | - "AdminPageFrameworkLoader_Option"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/option/AdminPageFrameworkLoader_Option.php", |
|
38 | - "AdminPageFrameworkLoader_FeedList"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/utility/AdminPageFrameworkLoader_FeedList.php", |
|
39 | - "AdminPageFrameworkLoader_Utility"=> AdminPageFrameworkLoader_Registry::$sDirPath . "/include/class/utility/AdminPageFrameworkLoader_Utility.php", |
|
3 | + "GitHubCustomFieldType"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/library/github-custom-field-type/GitHubCustomFieldType.php", |
|
4 | + "AdminPageFrameworkLoader_Bootstrap"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/AdminPageFrameworkLoader_Bootstrap.php", |
|
5 | + "AdminPageFrameworkLoader_AdminPage"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPage.php", |
|
6 | + "AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks.php", |
|
7 | + "AdminPageFrameworkLoader_AdminPageMetaBox_Notification"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPageMetaBox_Notification.php", |
|
8 | + "AdminPageFrameworkLoader_AdminPage_Addon"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon.php", |
|
9 | + "AdminPageFrameworkLoader_AdminPage_Addon_Top"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon_Top.php", |
|
10 | + "AdminPageFrameworkLoader_AdminPage_Help"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help.php", |
|
11 | + "AdminPageFrameworkLoader_AdminPage_Help_About"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_About.php", |
|
12 | + "AdminPageFrameworkLoader_AdminPage_Help_Debug"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Debug.php", |
|
13 | + "AdminPageFrameworkLoader_AdminPage_Help_Example"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Example.php", |
|
14 | + "AdminPageFrameworkLoader_AdminPage_Help_FAQ"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_FAQ.php", |
|
15 | + "AdminPageFrameworkLoader_AdminPage_Help_Guide"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Guide.php", |
|
16 | + "AdminPageFrameworkLoader_AdminPage_Help_Information"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Information.php", |
|
17 | + "AdminPageFrameworkLoader_AdminPage_Help_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report.php", |
|
18 | + "AdminPageFrameworkLoader_AdminPage_Help_Report_Report"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Report_Report.php", |
|
19 | + "AdminPageFrameworkLoader_AdminPage_Help_Tip"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Tip.php", |
|
20 | + "AdminPageFrameworkLoader_AdminPage_Tool"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/AdminPageFrameworkLoader_AdminPage_Tool.php", |
|
21 | + "AdminPageFrameworkLoader_AdminPage_Tool_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator.php", |
|
22 | + "AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes.php", |
|
23 | + "AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator.php", |
|
24 | + "AdminPageFrameworkLoader_AdminPage_Tool_Minifier"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/minifier/AdminPageFrameworkLoader_AdminPage_Tool_Minifier.php", |
|
25 | + "AdminPageFrameworkLoader_AdminPage_Tool_Minifier_Minifier"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/admin-page-framework/tool/minifier/AdminPageFrameworkLoader_AdminPage_Tool_Minifier_Minifier.php", |
|
26 | + "AdminPageFrameworkLoader_AdminPageWelcome"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/dashboard/AdminPageFrameworkLoader_AdminPageWelcome.php", |
|
27 | + "AdminPageFrameworkLoader_AdminPageWelcome_Welcome"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/dashboard/welcome/AdminPageFrameworkLoader_AdminPageWelcome_Welcome.php", |
|
28 | + "AdminPageFrameworkLoader_Demo"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/demo/AdminPageFrameworkLoader_Demo.php", |
|
29 | + "AdminPageFrameworkLoader_NetworkAdmin"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/network-admin/AdminPageFrameworkLoader_NetworkAdmin.php", |
|
30 | + "AdminPageFrameworkLoader_AdminPage_Page_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Page_Base.php", |
|
31 | + "AdminPageFrameworkLoader_AdminPage_RootBase"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_RootBase.php", |
|
32 | + "AdminPageFrameworkLoader_AdminPage_Section_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Section_Base.php", |
|
33 | + "AdminPageFrameworkLoader_AdminPage_Tab_Base"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_Base.php", |
|
34 | + "AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase.php", |
|
35 | + "AdminPageFrameworkLoader_Event"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/event/AdminPageFrameworkLoader_Event.php", |
|
36 | + "AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/event/AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion.php", |
|
37 | + "AdminPageFrameworkLoader_Option"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/option/AdminPageFrameworkLoader_Option.php", |
|
38 | + "AdminPageFrameworkLoader_FeedList"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/utility/AdminPageFrameworkLoader_FeedList.php", |
|
39 | + "AdminPageFrameworkLoader_Utility"=> AdminPageFrameworkLoader_Registry::$sDirPath."/include/class/utility/AdminPageFrameworkLoader_Utility.php", |
|
40 | 40 | ); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | // For front-end |
87 | 87 | // @see http://wordpress.stackexchange.com/a/82722 |
88 | - if ( ! is_admin() ) { |
|
88 | + if ( !is_admin() ) { |
|
89 | 89 | |
90 | 90 | // wp_enqueue_style( 'wp-color-picker' ); |
91 | 91 | wp_enqueue_script( |
@@ -277,9 +277,9 @@ discard block |
||
277 | 277 | protected function getField( $aField ) { |
278 | 278 | |
279 | 279 | // If the value is not set, apply the default value, 'transparent'. |
280 | - $aField['value'] = is_null( $aField['value'] ) |
|
280 | + $aField[ 'value' ] = is_null( $aField[ 'value' ] ) |
|
281 | 281 | ? 'transparent' |
282 | - : $aField['value']; |
|
282 | + : $aField[ 'value' ]; |
|
283 | 283 | |
284 | 284 | $aField[ 'attributes' ] = $this->_getInputAttributes( $aField ); |
285 | 285 | |
@@ -288,20 +288,20 @@ discard block |
||
288 | 288 | . "<div class='admin-page-framework-input-label-container'>" |
289 | 289 | . "<label for='{$aField[ 'input_id' ]}'>" |
290 | 290 | . $aField[ 'before_input' ] |
291 | - . ( $aField[ 'label' ] && ! $aField[ 'repeatable' ] |
|
292 | - ? "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">" |
|
293 | - . $aField['label'] |
|
291 | + . ( $aField[ 'label' ] && !$aField[ 'repeatable' ] |
|
292 | + ? "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">" |
|
293 | + . $aField[ 'label' ] |
|
294 | 294 | . "</span>" |
295 | 295 | : "" |
296 | 296 | ) |
297 | - . "<input " . $this->getAttributes( $aField[ 'attributes' ] ) . " />" |
|
297 | + . "<input ".$this->getAttributes( $aField[ 'attributes' ] )." />" |
|
298 | 298 | . $aField[ 'after_input' ] |
299 | 299 | . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element. |
300 | 300 | . "</label>" |
301 | 301 | . "<div class='colorpicker' id='color_{$aField[ 'input_id' ]}'></div>" // this div element with this class selector becomes a farbtastic color picker. ( below 3.4.x ) // rel='{$aField['input_id']}' |
302 | 302 | . $this->_getColorPickerEnablerScript( "{$aField[ 'input_id' ]}" ) |
303 | 303 | . "</div>" |
304 | - . $aField['after_label']; |
|
304 | + . $aField[ 'after_label' ]; |
|
305 | 305 | |
306 | 306 | } |
307 | 307 | /** |
@@ -313,13 +313,13 @@ discard block |
||
313 | 313 | private function _getInputAttributes( array $aField ) { |
314 | 314 | |
315 | 315 | return array( |
316 | - 'color' => $aField['value'], |
|
317 | - 'value' => $aField['value'], |
|
316 | + 'color' => $aField[ 'value' ], |
|
317 | + 'value' => $aField[ 'value' ], |
|
318 | 318 | 'data-default' => isset( $aField[ 'default' ] ) |
319 | 319 | ? $aField[ 'default' ] |
320 | 320 | : 'transparent', // used by the repeatable script |
321 | 321 | 'type' => 'text', // it must be text |
322 | - 'class' => trim( 'input_color ' . $aField['attributes']['class'] ), |
|
322 | + 'class' => trim( 'input_color '.$aField[ 'attributes' ][ 'class' ] ), |
|
323 | 323 | ) + $aField[ 'attributes' ]; |
324 | 324 | |
325 | 325 | } |