@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | 'after_label' => null, |
60 | 60 | 'before_field' => null, |
61 | 61 | 'after_field' => null, |
62 | - 'label_min_width' => '', // (string|integer) min-width applied to the input label in pixels. 3.8.0+ Changed the default value from 140 to 0 as it is now applied via embedded CSS. When this value is set by the user, it is set inline and the value will be overridden. [3.8.4+] Changed the value from `0` to `''`. |
|
62 | + 'label_min_width' => '', // (string|integer) min-width applied to the input label in pixels. 3.8.0+ Changed the default value from 140 to 0 as it is now applied via embedded CSS. When this value is set by the user, it is set inline and the value will be overridden. [3.8.4+] Changed the value from `0` to `''`. |
|
63 | 63 | 'before_fieldset' => null, // 3.1.1+ |
64 | 64 | 'after_fieldset' => null, // 3.1.1+ |
65 | 65 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * @param object $oMsg The framework message object. |
100 | 100 | * @param boolean $bAutoRegister Whether or not to register the field type(s). |
101 | 101 | */ |
102 | - public function __construct( $asClassName='admin_page_framework', $asFieldTypeSlug=null, $oMsg=null, $bAutoRegister=true ) { |
|
102 | + public function __construct( $asClassName = 'admin_page_framework', $asFieldTypeSlug = null, $oMsg = null, $bAutoRegister = true ) { |
|
103 | 103 | |
104 | 104 | $this->aFieldTypeSlugs = empty( $asFieldTypeSlug ) |
105 | 105 | ? $this->aFieldTypeSlugs |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | |
111 | 111 | // This automatically registers the field type. The build-in ones will be registered manually so it will be skipped. |
112 | 112 | if ( $bAutoRegister ) { |
113 | - foreach( ( array ) $asClassName as $_sClassName ) { |
|
113 | + foreach ( ( array ) $asClassName as $_sClassName ) { |
|
114 | 114 | add_filter( |
115 | - 'field_types_' . $_sClassName, |
|
115 | + 'field_types_'.$_sClassName, |
|
116 | 116 | array( $this, '_replyToRegisterInputFieldType' ) |
117 | 117 | ); |
118 | 118 | } |
@@ -158,8 +158,8 @@ discard block |
||
158 | 158 | } |
159 | 159 | return is_array( $asLabel ) // if the user sets multiple items |
160 | 160 | ? $this->getElement( |
161 | - $asElement, // subject |
|
162 | - $this->getAsArray( $asKey, true /* preserve empty */ ), // dimensional path |
|
161 | + $asElement, // subject |
|
162 | + $this->getAsArray( $asKey, true /* preserve empty */ ), // dimensional path |
|
163 | 163 | '' // default - if the element is not found, return an empty |
164 | 164 | ) |
165 | 165 | : $asElement; |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | */ |
175 | 175 | protected function getFieldOutput( array $aFieldset ) { |
176 | 176 | |
177 | - if ( ! is_object( $aFieldset[ '_caller_object' ] ) ) { |
|
177 | + if ( !is_object( $aFieldset[ '_caller_object' ] ) ) { |
|
178 | 178 | return ''; |
179 | 179 | } |
180 | 180 | |
@@ -182,14 +182,14 @@ discard block |
||
182 | 182 | $aFieldset[ '_parent_field_object' ] = $aFieldset[ '_field_object' ]; // 3.6.0+ |
183 | 183 | |
184 | 184 | // 3.7.0+ The caller object is no longer a factory object but a form object. |
185 | - $_oCallerForm = $aFieldset[ '_caller_object' ]; |
|
185 | + $_oCallerForm = $aFieldset[ '_caller_object' ]; |
|
186 | 186 | |
187 | 187 | $_oFieldset = new AdminPageFramework_Form_View___Fieldset( |
188 | - $aFieldset, // the field definition array |
|
189 | - $_oCallerForm->aSavedData, // the stored form data |
|
190 | - $_oCallerForm->getFieldErrors(), // the field error array. |
|
191 | - $_oCallerForm->aFieldTypeDefinitions, // the field type definition array. |
|
192 | - $_oCallerForm->oMsg, // the system message object |
|
188 | + $aFieldset, // the field definition array |
|
189 | + $_oCallerForm->aSavedData, // the stored form data |
|
190 | + $_oCallerForm->getFieldErrors(), // the field error array. |
|
191 | + $_oCallerForm->aFieldTypeDefinitions, // the field type definition array. |
|
192 | + $_oCallerForm->oMsg, // the system message object |
|
193 | 193 | $_oCallerForm->aCallbacks // field output element callables. |
194 | 194 | ); |
195 | 195 | return $_oFieldset->get(); |
@@ -229,13 +229,13 @@ discard block |
||
229 | 229 | * @since 3.0.3 Tweaked it to have better execution speed. |
230 | 230 | * @internal |
231 | 231 | */ |
232 | - public function getDefinitionArray( $sFieldTypeSlug='' ) { |
|
232 | + public function getDefinitionArray( $sFieldTypeSlug = '' ) { |
|
233 | 233 | |
234 | 234 | // The uniteArrays() method resulted in somewhat being slow due to overhead on checking array keys for recursive array merges. |
235 | 235 | $_aDefaultKeys = $this->aDefaultKeys + self::$_aDefaultKeys; |
236 | - $_aDefaultKeys['attributes'] = isset( $this->aDefaultKeys['attributes'] ) && is_array( $this->aDefaultKeys['attributes'] ) |
|
237 | - ? $this->aDefaultKeys['attributes'] + self::$_aDefaultKeys['attributes'] |
|
238 | - : self::$_aDefaultKeys['attributes']; |
|
236 | + $_aDefaultKeys[ 'attributes' ] = isset( $this->aDefaultKeys[ 'attributes' ] ) && is_array( $this->aDefaultKeys[ 'attributes' ] ) |
|
237 | + ? $this->aDefaultKeys[ 'attributes' ] + self::$_aDefaultKeys[ 'attributes' ] |
|
238 | + : self::$_aDefaultKeys[ 'attributes' ]; |
|
239 | 239 | |
240 | 240 | return array( |
241 | 241 | 'sFieldTypeSlug' => $sFieldTypeSlug, |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | * @since 3.0.0 |
274 | 274 | * @internal |
275 | 275 | */ |
276 | - public function _replyToFieldTypeSetter( $sFieldSetType='' ) { |
|
276 | + public function _replyToFieldTypeSetter( $sFieldSetType = '' ) { |
|
277 | 277 | $this->_sFieldSetType = $sFieldSetType; |
278 | 278 | } |
279 | 279 | |
@@ -327,8 +327,8 @@ discard block |
||
327 | 327 | wp_enqueue_script( 'media-upload' ); |
328 | 328 | } |
329 | 329 | |
330 | - if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php', ) ) ) { |
|
331 | - add_filter( 'gettext', array( $this, '_replyToReplaceThickBoxText' ) , 1, 2 ); |
|
330 | + if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php',) ) ) { |
|
331 | + add_filter( 'gettext', array( $this, '_replyToReplaceThickBoxText' ), 1, 2 ); |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | } |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | public function _replyToReplaceThickBoxText( $sTranslated, $sText ) { |
344 | 344 | |
345 | 345 | // Replace the button label in the media thick box. |
346 | - if ( ! in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) { |
|
346 | + if ( !in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) { |
|
347 | 347 | return $sTranslated; |
348 | 348 | } |
349 | 349 | if ( $sText !== 'Insert into Post' ) { |
@@ -353,8 +353,8 @@ discard block |
||
353 | 353 | return $sTranslated; |
354 | 354 | } |
355 | 355 | |
356 | - if ( isset( $_GET['button_label'] ) ) { |
|
357 | - return $_GET['button_label']; |
|
356 | + if ( isset( $_GET[ 'button_label' ] ) ) { |
|
357 | + return $_GET[ 'button_label' ]; |
|
358 | 358 | } |
359 | 359 | |
360 | 360 | return $this->oProp->sThickBoxButtonUseThis |
@@ -373,11 +373,11 @@ discard block |
||
373 | 373 | */ |
374 | 374 | public function _replyToRemovingMediaLibraryTab( $aTabs ) { |
375 | 375 | |
376 | - if ( ! isset( $_REQUEST[ 'enable_external_source' ] ) ) { |
|
376 | + if ( !isset( $_REQUEST[ 'enable_external_source' ] ) ) { |
|
377 | 377 | return $aTabs; |
378 | 378 | } |
379 | 379 | |
380 | - if ( ! $_REQUEST[ 'enable_external_source' ] ) { |
|
380 | + if ( !$_REQUEST[ 'enable_external_source' ] ) { |
|
381 | 381 | unset( $aTabs[ 'type_url' ] ); // removes the 'From URL' tab in the thick box. |
382 | 382 | } |
383 | 383 | return $aTabs; |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | * @since 3.8.0 |
393 | 393 | * @return string |
394 | 394 | */ |
395 | - protected function getLabelContainerAttributes( $aField, $asClassAttributes, array $aAttributes=array() ) { |
|
395 | + protected function getLabelContainerAttributes( $aField, $asClassAttributes, array $aAttributes = array() ) { |
|
396 | 396 | |
397 | 397 | $aAttributes[ 'class' ] = $this->getClassAttribute( $asClassAttributes, $this->getElement( $aAttributes, 'class' ) ); |
398 | 398 | $aAttributes[ 'style' ] = $this->getStyleAttribute( |
@@ -320,14 +320,14 @@ discard block |
||
320 | 320 | wp_enqueue_script( 'thickbox' ); |
321 | 321 | wp_enqueue_style( 'thickbox' ); |
322 | 322 | |
323 | - if ( function_exists( 'wp_enqueue_media' ) ) { |
|
323 | + if ( function_exists( 'wp_enqueue_media' ) ) { |
|
324 | 324 | // If the WordPress version is 3.5 or above, |
325 | 325 | new AdminPageFramework_Form_View___Script_MediaUploader( $this->oMsg ); |
326 | 326 | } else { |
327 | 327 | wp_enqueue_script( 'media-upload' ); |
328 | 328 | } |
329 | 329 | |
330 | - if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php', ) ) ) { |
|
330 | + if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php', ) ) ) { |
|
331 | 331 | add_filter( 'gettext', array( $this, '_replyToReplaceThickBoxText' ) , 1, 2 ); |
332 | 332 | } |
333 | 333 | |
@@ -343,17 +343,17 @@ discard block |
||
343 | 343 | public function _replyToReplaceThickBoxText( $sTranslated, $sText ) { |
344 | 344 | |
345 | 345 | // Replace the button label in the media thick box. |
346 | - if ( ! in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) { |
|
346 | + if ( ! in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) { |
|
347 | 347 | return $sTranslated; |
348 | 348 | } |
349 | - if ( $sText !== 'Insert into Post' ) { |
|
349 | + if ( $sText !== 'Insert into Post' ) { |
|
350 | 350 | return $sTranslated; |
351 | 351 | } |
352 | - if ( $this->getQueryValueInURLByKey( wp_get_referer(), 'referrer' ) !== 'admin_page_framework' ) { |
|
352 | + if ( $this->getQueryValueInURLByKey( wp_get_referer(), 'referrer' ) !== 'admin_page_framework' ) { |
|
353 | 353 | return $sTranslated; |
354 | 354 | } |
355 | 355 | |
356 | - if ( isset( $_GET['button_label'] ) ) { |
|
356 | + if ( isset( $_GET['button_label'] ) ) { |
|
357 | 357 | return $_GET['button_label']; |
358 | 358 | } |
359 | 359 |
@@ -390,6 +390,7 @@ |
||
390 | 390 | * This is used for element that `label_min_width` is applied. |
391 | 391 | * |
392 | 392 | * @since 3.8.0 |
393 | + * @param string $asClassAttributes |
|
393 | 394 | * @return string |
394 | 395 | */ |
395 | 396 | protected function getLabelContainerAttributes( $aField, $asClassAttributes, array $aAttributes=array() ) { |
@@ -90,16 +90,16 @@ discard block |
||
90 | 90 | 'AdminPageFramework_Form_View___CSS_FieldError', |
91 | 91 | 'AdminPageFramework_Form_View___CSS_ToolTip', |
92 | 92 | ); |
93 | - foreach( $_aClassNames as $_sClassName ) { |
|
93 | + foreach ( $_aClassNames as $_sClassName ) { |
|
94 | 94 | $_oCSS = new $_sClassName; |
95 | - $this->aResources[ 'internal_styles' ][] = $_oCSS->get(); |
|
95 | + $this->aResources[ 'internal_styles' ][ ] = $_oCSS->get(); |
|
96 | 96 | } |
97 | 97 | $_aClassNamesForIE = array( |
98 | 98 | 'AdminPageFramework_Form_View___CSS_CollapsibleSectionIE', |
99 | 99 | ); |
100 | - foreach( $_aClassNames as $_sClassName ) { |
|
100 | + foreach ( $_aClassNames as $_sClassName ) { |
|
101 | 101 | $_oCSS = new $_sClassName; |
102 | - $this->aResources[ 'internal_styles_ie' ][] = $_oCSS->get(); |
|
102 | + $this->aResources[ 'internal_styles_ie' ][ ] = $_oCSS->get(); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @return void |
118 | 118 | */ |
119 | 119 | private function ___set( $aAllFieldsets ) { |
120 | - foreach( $aAllFieldsets as $_sSecitonID => $_aFieldsets ) { |
|
120 | + foreach ( $aAllFieldsets as $_sSecitonID => $_aFieldsets ) { |
|
121 | 121 | $this->___setFieldResourcesBySection( $_aFieldsets ); |
122 | 122 | } |
123 | 123 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | private function ___setFieldResourcesBySection( $_aFieldsets ) { |
130 | 130 | |
131 | 131 | $_bIsSubSectionLoaded = false; |
132 | - foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
132 | + foreach ( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
133 | 133 | // @todo Examine if this structure is correct or not. |
134 | 134 | // It may not be necessary to check the sub-section dimensions as this is not the saved options array. |
135 | 135 | // if it's a sub-section |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | continue; |
141 | 141 | } |
142 | 142 | $_bIsSubSectionLoaded = true; |
143 | - foreach( $_aSubSectionOrField as $_aField ) { |
|
143 | + foreach ( $_aSubSectionOrField as $_aField ) { |
|
144 | 144 | $this->___setFieldResources( $_aField ); |
145 | 145 | } |
146 | 146 | continue; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | private function ___setFieldResources( $aFieldset ) { |
166 | 166 | |
167 | 167 | // Check the field conditions. |
168 | - if ( ! $this->___isFieldsetAllowed( $aFieldset ) ) { |
|
168 | + if ( !$this->___isFieldsetAllowed( $aFieldset ) ) { |
|
169 | 169 | return; |
170 | 170 | } |
171 | 171 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | return $this->callBack( |
197 | 197 | $this->aCallbacks[ 'is_fieldset_registration_allowed' ], |
198 | 198 | array( |
199 | - true, // 1st parameter |
|
199 | + true, // 1st parameter |
|
200 | 200 | $aFieldset, // 2nd parameter |
201 | 201 | ) |
202 | 202 | ); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | */ |
209 | 209 | private function ___setResourcesOfNestedFields( $aFieldset ) { |
210 | 210 | |
211 | - if ( ! $this->hasFieldDefinitionsInContent( $aFieldset ) ) { |
|
211 | + if ( !$this->hasFieldDefinitionsInContent( $aFieldset ) ) { |
|
212 | 212 | return; |
213 | 213 | } |
214 | 214 | foreach ( $aFieldset[ 'content' ] as $_asNestedFieldset ) { |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | $this->callBack( |
249 | 249 | $this->aCallbacks[ 'load_fieldset_resource' ], |
250 | 250 | array( |
251 | - $aFieldset, // 1st parameter |
|
251 | + $aFieldset, // 1st parameter |
|
252 | 252 | ) |
253 | 253 | ); |
254 | 254 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | // Be careful not to add duplicate items as currently the sub-field items are parsed. |
257 | 257 | |
258 | 258 | // Is already registered? |
259 | - if ( $this->hasBeenCalled( 'registered_' . $_sFieldtype . '_' . $this->aArguments[ 'structure_type' ] ) ) { |
|
259 | + if ( $this->hasBeenCalled( 'registered_'.$_sFieldtype.'_'.$this->aArguments[ 'structure_type' ] ) ) { |
|
260 | 260 | return; |
261 | 261 | } |
262 | 262 | |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $_aFieldTypeDefinition, |
272 | 272 | $this->aResources |
273 | 273 | ); |
274 | - $this->aResources = $_oFieldTypeResources->get(); |
|
274 | + $this->aResources = $_oFieldTypeResources->get(); |
|
275 | 275 | |
276 | 276 | } |
277 | 277 |
@@ -129,7 +129,7 @@ |
||
129 | 129 | private function ___setFieldResourcesBySection( $_aFieldsets ) { |
130 | 130 | |
131 | 131 | $_bIsSubSectionLoaded = false; |
132 | - foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
132 | + foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
133 | 133 | // @todo Examine if this structure is correct or not. |
134 | 134 | // It may not be necessary to check the sub-section dimensions as this is not the saved options array. |
135 | 135 | // if it's a sub-section |
@@ -164,8 +164,8 @@ discard block |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | // Call the user constructor. |
167 | - $this->start(); // defined in the controller class. |
|
168 | - $this->oUtil->addAndDoAction( $this, 'start_' . $this->oProp->sClassName, $this ); |
|
167 | + $this->start(); // defined in the controller class. |
|
168 | + $this->oUtil->addAndDoAction( $this, 'start_'.$this->oProp->sClassName, $this ); |
|
169 | 169 | |
170 | 170 | } |
171 | 171 | /** |
@@ -174,8 +174,8 @@ discard block |
||
174 | 174 | * @return array |
175 | 175 | */ |
176 | 176 | private function ___getSubClassNames() { |
177 | - foreach( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) { |
|
178 | - $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix . $this->_sStructureType; |
|
177 | + foreach ( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) { |
|
178 | + $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix.$this->_sStructureType; |
|
179 | 179 | } |
180 | 180 | return $this->aSubClassNames + $this->_aSubClassNames; |
181 | 181 | } |
@@ -189,15 +189,15 @@ discard block |
||
189 | 189 | */ |
190 | 190 | public function _replyToLoadComponents( /* $oScreen */ ) { |
191 | 191 | |
192 | - if ( ! $this->_isInThePage() ) { |
|
192 | + if ( !$this->_isInThePage() ) { |
|
193 | 193 | return; |
194 | 194 | } |
195 | 195 | |
196 | - if ( ! isset( $this->oResource ) ) { |
|
196 | + if ( !isset( $this->oResource ) ) { |
|
197 | 197 | $this->oResource = $this->_replyTpSetAndGetInstance_oResource(); |
198 | 198 | } |
199 | 199 | |
200 | - if ( ! isset( $this->oLink ) ) { |
|
200 | + if ( !isset( $this->oLink ) ) { |
|
201 | 201 | $this->oLink = $this->_replyTpSetAndGetInstance_oLink(); |
202 | 202 | } |
203 | 203 | |
@@ -211,10 +211,10 @@ discard block |
||
211 | 211 | * Calls the load method and callbacks. |
212 | 212 | * @since 3.8.14 |
213 | 213 | */ |
214 | - protected function _load( $aActions=array() ) { |
|
214 | + protected function _load( $aActions = array() ) { |
|
215 | 215 | $aActions = empty( $aActions ) |
216 | 216 | ? array( |
217 | - 'load_' . $this->oProp->sClassName, |
|
217 | + 'load_'.$this->oProp->sClassName, |
|
218 | 218 | ) |
219 | 219 | : $aActions; |
220 | 220 | $this->load(); |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | */ |
227 | 227 | protected function _setUp() { |
228 | 228 | $aActions = array( |
229 | - 'set_up_' . $this->oProp->sClassName, |
|
229 | + 'set_up_'.$this->oProp->sClassName, |
|
230 | 230 | ); |
231 | 231 | $this->setUp(); |
232 | 232 | $this->oUtil->addAndDoActions( $this, $aActions, $this ); |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | */ |
270 | 270 | public function _replyToDetermineToLoad() { |
271 | 271 | |
272 | - if ( ! $this->_isInThePage() ) { |
|
272 | + if ( !$this->_isInThePage() ) { |
|
273 | 273 | return; |
274 | 274 | } |
275 | 275 | |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | // Set and return the sub class object instance. |
334 | 334 | if ( isset( $this->aSubClassNames[ $sPropertyName ] ) ) { |
335 | 335 | return call_user_func( |
336 | - array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
336 | + array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
337 | 337 | ); |
338 | 338 | } |
339 | 339 | |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | */ |
368 | 368 | public function _replyTpSetAndGetInstance_oMsg() { |
369 | 369 | $this->oMsg = call_user_func_array( |
370 | - array( $this->aSubClassNames[ 'oMsg' ], 'getInstance'), |
|
370 | + array( $this->aSubClassNames[ 'oMsg' ], 'getInstance' ), |
|
371 | 371 | array( $this->oProp->sTextDomain ) // parameters |
372 | 372 | ); |
373 | 373 | return $this->oMsg; |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | * |
433 | 433 | * @internal |
434 | 434 | */ |
435 | - public function __call( $sMethodName, $aArguments=null ) { |
|
435 | + public function __call( $sMethodName, $aArguments = null ) { |
|
436 | 436 | |
437 | 437 | $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 ); |
438 | 438 | |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | |
463 | 463 | // Check if the method name does not contain a backslash. |
464 | 464 | if ( false === strpos( $sMethodName, "\\" ) ) { |
465 | - return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
465 | + return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
466 | 466 | } |
467 | 467 | |
468 | 468 | // If the method name contains a backslash, the user may be using a name space. |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | array( $this, $_sAutoCallbackMethodName ), |
474 | 474 | $aArguments |
475 | 475 | ) |
476 | - : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
476 | + : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
477 | 477 | |
478 | 478 | } |
479 | 479 | |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | */ |
484 | 484 | private function _triggerUndefinedMethodWarning( $sMethodName ) { |
485 | 485 | trigger_error( |
486 | - AdminPageFramework_Registry::NAME . ': ' |
|
486 | + AdminPageFramework_Registry::NAME.': ' |
|
487 | 487 | . sprintf( |
488 | 488 | __( 'The method is not defined: %1$s', $this->oProp->sTextDomain ), |
489 | 489 | $sMethodName |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | */ |
190 | 190 | public function _replyToLoadComponents( /* $oScreen */ ) { |
191 | 191 | |
192 | - if ( ! $this->_isInThePage() ) { |
|
192 | + if ( ! $this->_isInThePage() ) { |
|
193 | 193 | return; |
194 | 194 | } |
195 | 195 | |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | * @since 3.1.0 |
241 | 241 | * @internal |
242 | 242 | */ |
243 | - protected function _isInstantiatable() { |
|
243 | + protected function _isInstantiatable() { |
|
244 | 244 | return true; |
245 | 245 | } |
246 | 246 | |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | */ |
270 | 270 | public function _replyToDetermineToLoad() { |
271 | 271 | |
272 | - if ( ! $this->_isInThePage() ) { |
|
272 | + if ( ! $this->_isInThePage() ) { |
|
273 | 273 | return; |
274 | 274 | } |
275 | 275 | |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | * |
433 | 433 | * @internal |
434 | 434 | */ |
435 | - public function __call( $sMethodName, $aArguments=null ) { |
|
435 | + public function __call( $sMethodName, $aArguments=null ) { |
|
436 | 436 | |
437 | 437 | $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 ); |
438 | 438 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @since 3.7.9 Added the second parameter to accept an action hook name. |
27 | 27 | */ |
28 | 28 | |
29 | - public function __construct( $oFactory, $sActionHookName='admin_notices' ) { |
|
29 | + public function __construct( $oFactory, $sActionHookName = 'admin_notices' ) { |
|
30 | 30 | |
31 | 31 | $this->oFactory = $oFactory; |
32 | 32 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function _replyToPrintSettingNotice() { |
47 | 47 | |
48 | - if ( ! $this->_shouldProceed() ) { |
|
48 | + if ( !$this->_shouldProceed() ) { |
|
49 | 49 | return; |
50 | 50 | } |
51 | 51 | $this->oFactory->oForm->printSubmitNotices(); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | private function _shouldProceed() { |
61 | 61 | |
62 | - if ( ! $this->oFactory->isInThePage() ) { |
|
62 | + if ( !$this->oFactory->isInThePage() ) { |
|
63 | 63 | return false; |
64 | 64 | } |
65 | 65 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @since 2.1.0 |
54 | 54 | * @internal |
55 | 55 | */ |
56 | - protected function _setHelpTab( $sID, $sTitle, $aContents, $aSideBarContents=array() ) { |
|
56 | + protected function _setHelpTab( $sID, $sTitle, $aContents, $aSideBarContents = array() ) { |
|
57 | 57 | |
58 | 58 | if ( empty( $aContents ) ) { |
59 | 59 | return; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | ) |
71 | 71 | ); |
72 | 72 | |
73 | - if ( ! empty( $aSideBarContents ) ) { |
|
73 | + if ( !empty( $aSideBarContents ) ) { |
|
74 | 74 | $this->_oScreen->set_help_sidebar( implode( PHP_EOL, $aSideBarContents ) ); |
75 | 75 | } |
76 | 76 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @internal |
83 | 83 | */ |
84 | 84 | protected function _formatHelpDescription( $sHelpDescription ) { |
85 | - return "<div class='contextual-help-description'>" . $sHelpDescription . "</div>"; |
|
85 | + return "<div class='contextual-help-description'>".$sHelpDescription."</div>"; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | |
@@ -106,10 +106,10 @@ discard block |
||
106 | 106 | * @remark This method just adds the given text into the class property. The actual registration will be performed with the <em>replyToRegisterHelpTabTextForMetaBox()</em> method. |
107 | 107 | * @internal |
108 | 108 | */ |
109 | - public function _addHelpText( $sHTMLContent, $sHTMLSidebarContent="" ) { |
|
109 | + public function _addHelpText( $sHTMLContent, $sHTMLSidebarContent = "" ) { |
|
110 | 110 | |
111 | - $this->oProp->aHelpTabText[] = "<div class='contextual-help-description'>" . $sHTMLContent . "</div>"; |
|
112 | - $this->oProp->aHelpTabTextSide[] = "<div class='contextual-help-description'>" . $sHTMLSidebarContent . "</div>"; |
|
111 | + $this->oProp->aHelpTabText[ ] = "<div class='contextual-help-description'>".$sHTMLContent."</div>"; |
|
112 | + $this->oProp->aHelpTabTextSide[ ] = "<div class='contextual-help-description'>".$sHTMLSidebarContent."</div>"; |
|
113 | 113 | |
114 | 114 | } |
115 | 115 | |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | * @remark This method just adds the given text into the class property. The actual registration will be performed with the `replyToRegisterHelpTabTextForMetaBox()` method. |
126 | 126 | * @internal |
127 | 127 | */ |
128 | - public function _addHelpTextForFormFields( $sFieldTitle, $sHelpText, $sHelpTextSidebar="" ) { |
|
128 | + public function _addHelpTextForFormFields( $sFieldTitle, $sHelpText, $sHelpTextSidebar = "" ) { |
|
129 | 129 | $this->_addHelpText( |
130 | - "<span class='contextual-help-tab-title'>" . $sFieldTitle . "</span> - " . PHP_EOL |
|
130 | + "<span class='contextual-help-tab-title'>".$sFieldTitle."</span> - ".PHP_EOL |
|
131 | 131 | . $sHelpText, |
132 | 132 | $sHelpTextSidebar |
133 | 133 | ); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | public function _replyToRegisterHelpTabText() { |
146 | 146 | |
147 | 147 | // Check if the currently loaded page is of meta box page. |
148 | - if ( ! $this->oProp->oCaller->isInThePage() ) { |
|
148 | + if ( !$this->oProp->oCaller->isInThePage() ) { |
|
149 | 149 | return false; |
150 | 150 | } |
151 | 151 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | */ |
63 | 63 | protected function _setHelpTab( $sID, $sTitle, $aContents, $aSideBarContents=array() ) { |
64 | 64 | |
65 | - if ( empty( $aContents ) ) { |
|
65 | + if ( empty( $aContents ) ) { |
|
66 | 66 | return; |
67 | 67 | } |
68 | 68 |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @since 3.3.0 |
28 | 28 | */ |
29 | - public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
29 | + public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) { |
|
30 | 30 | |
31 | 31 | $_sProprtyClassName = isset( $this->aSubClassNames[ 'oProp' ] ) |
32 | 32 | ? $this->aSubClassNames[ 'oProp' ] |
33 | - : 'AdminPageFramework_Property_' . $this->_sStructureType; |
|
33 | + : 'AdminPageFramework_Property_'.$this->_sStructureType; |
|
34 | 34 | |
35 | 35 | $this->oProp = new $_sProprtyClassName( |
36 | 36 | $this, |
@@ -47,12 +47,12 @@ discard block |
||
47 | 47 | // if ( $this->oProp->bIsAdminAjax ) { |
48 | 48 | // return; |
49 | 49 | // } |
50 | - if ( ! $this->oProp->bIsAdmin ) { |
|
50 | + if ( !$this->oProp->bIsAdmin ) { |
|
51 | 51 | return; |
52 | 52 | } |
53 | 53 | |
54 | 54 | add_action( 'wp_loaded', array( $this, '_replyToDetermineToLoad' ) ); |
55 | - add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToLoadComponentsForAjax' ), 100 ); |
|
55 | + add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToLoadComponentsForAjax' ), 100 ); |
|
56 | 56 | |
57 | 57 | } |
58 | 58 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * @callback add_action wp_loaded |
65 | 65 | */ |
66 | 66 | public function _replyToLoadComponentsForAjax() { |
67 | - if ( ! $this->oProp->bIsAdminAjax ) { |
|
67 | + if ( !$this->oProp->bIsAdminAjax ) { |
|
68 | 68 | return; |
69 | 69 | } |
70 | 70 | new AdminPageFramework_Model_Menu__RegisterMenu( $this, 'pseudo_admin_menu' ); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * @since 3.3.1 Moved from `AdminPageFramework_Base`. |
112 | 112 | * @internal |
113 | 113 | */ |
114 | - public function __call( $sMethodName, $aArgs=null ) { |
|
114 | + public function __call( $sMethodName, $aArgs = null ) { |
|
115 | 115 | |
116 | 116 | $_sPageSlug = $this->oProp->getCurrentPageSlug(); |
117 | 117 | $_sTabSlug = $this->oProp->getCurrentTabSlug( $_sPageSlug ); |
@@ -122,15 +122,15 @@ discard block |
||
122 | 122 | 'load_pre_', |
123 | 123 | ); |
124 | 124 | |
125 | - switch( $this->_getCallbackName( $sMethodName, $_sPageSlug, $_aKnownMethodPrefixes ) ) { |
|
125 | + switch ( $this->_getCallbackName( $sMethodName, $_sPageSlug, $_aKnownMethodPrefixes ) ) { |
|
126 | 126 | |
127 | 127 | // add_settings_section() callback |
128 | 128 | case 'section_pre_': |
129 | - return $this->_renderSectionDescription( $sMethodName ); // defined in AdminPageFramework_Setting |
|
129 | + return $this->_renderSectionDescription( $sMethodName ); // defined in AdminPageFramework_Setting |
|
130 | 130 | |
131 | 131 | // add_settings_field() callback |
132 | 132 | case 'field_pre_': |
133 | - return $this->_renderSettingField( $_mFirstArg, $_sPageSlug ); // defined in AdminPageFramework_Setting |
|
133 | + return $this->_renderSettingField( $_mFirstArg, $_sPageSlug ); // defined in AdminPageFramework_Setting |
|
134 | 134 | |
135 | 135 | // load-{page} callback |
136 | 136 | case 'load_pre_': |
@@ -148,9 +148,9 @@ discard block |
||
148 | 148 | * @return string The found callback method name or the prefix of a known callback method name. An empty string if not found. |
149 | 149 | * @internal |
150 | 150 | */ |
151 | - private function _getCallbackName( $sMethodName, $sPageSlug, array $aKnownMethodPrefixes=array() ) { |
|
151 | + private function _getCallbackName( $sMethodName, $sPageSlug, array $aKnownMethodPrefixes = array() ) { |
|
152 | 152 | |
153 | - foreach( $aKnownMethodPrefixes as $_sMethodPrefix ) { |
|
153 | + foreach ( $aKnownMethodPrefixes as $_sMethodPrefix ) { |
|
154 | 154 | if ( $this->oUtil->hasPrefix( $_sMethodPrefix, $sMethodName ) ) { |
155 | 155 | return $_sMethodPrefix; |
156 | 156 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | */ |
175 | 175 | protected function _doPageLoadCall( $sMethodName, $sPageSlug, $sTabSlug, $oScreen ) { |
176 | 176 | |
177 | - if ( ! $this->_isPageLoadCall( $sMethodName, $sPageSlug, $oScreen ) ) { |
|
177 | + if ( !$this->_isPageLoadCall( $sMethodName, $sPageSlug, $oScreen ) ) { |
|
178 | 178 | return; |
179 | 179 | } |
180 | 180 | |
@@ -198,10 +198,10 @@ discard block |
||
198 | 198 | // the tab slug will be empty unless an in-page tab is added. |
199 | 199 | $sTabSlug = $this->oProp->getCurrentTabSlug( $sPageSlug ); |
200 | 200 | if ( strlen( $sTabSlug ) ) { |
201 | - $this->_setShowDebugInfoProperty( $sPageSlug, $sTabSlug ); // 3.8.8+ |
|
201 | + $this->_setShowDebugInfoProperty( $sPageSlug, $sTabSlug ); // 3.8.8+ |
|
202 | 202 | $this->oUtil->addAndDoActions( |
203 | 203 | $this, // the caller object |
204 | - array( "load_{$sPageSlug}_" . $sTabSlug ), |
|
204 | + array( "load_{$sPageSlug}_".$sTabSlug ), |
|
205 | 205 | $this // the admin page object - this lets third-party scripts use the framework methods. |
206 | 206 | ); |
207 | 207 | } |
@@ -226,10 +226,10 @@ discard block |
||
226 | 226 | * @since 3.8.8 |
227 | 227 | * @return void |
228 | 228 | */ |
229 | - private function _setShowDebugInfoProperty( $sPageSlug, $sTabSlug='' ) { |
|
229 | + private function _setShowDebugInfoProperty( $sPageSlug, $sTabSlug = '' ) { |
|
230 | 230 | |
231 | 231 | // For the page, |
232 | - if ( ! strlen( $sTabSlug ) ) { |
|
232 | + if ( !strlen( $sTabSlug ) ) { |
|
233 | 233 | $this->oProp->bShowDebugInfo = $this->oUtil->getElement( |
234 | 234 | $this->oProp->aPages, |
235 | 235 | array( $sPageSlug, 'show_debug_info' ), |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | if ( substr( $sMethodName, strlen( 'load_pre_' ) ) !== $sPageSlug ) { |
275 | 275 | return false; |
276 | 276 | } |
277 | - if ( ! isset( $this->oProp->aPageHooks[ $sPageSlug ] ) ) { |
|
277 | + if ( !isset( $this->oProp->aPageHooks[ $sPageSlug ] ) ) { |
|
278 | 278 | return false; |
279 | 279 | } |
280 | 280 | $_sPageHook = is_object( $osScreenORPageHook ) |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | // } |
303 | 303 | |
304 | 304 | // Nothing to do in the network admin area. |
305 | - return ! is_network_admin(); |
|
305 | + return !is_network_admin(); |
|
306 | 306 | |
307 | 307 | } |
308 | 308 | |
@@ -323,11 +323,11 @@ discard block |
||
323 | 323 | } |
324 | 324 | |
325 | 325 | // If the setUp method is not loaded yet, |
326 | - if ( ! did_action( 'set_up_' . $this->oProp->sClassName ) ) { |
|
326 | + if ( !did_action( 'set_up_'.$this->oProp->sClassName ) ) { |
|
327 | 327 | return true; |
328 | 328 | } |
329 | 329 | |
330 | - if ( ! isset( $_GET[ 'page' ] ) ) { |
|
330 | + if ( !isset( $_GET[ 'page' ] ) ) { |
|
331 | 331 | return false; |
332 | 332 | } |
333 | 333 |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * @since 3.3.1 Moved from `AdminPageFramework_Base`. |
112 | 112 | * @internal |
113 | 113 | */ |
114 | - public function __call( $sMethodName, $aArgs=null ) { |
|
114 | + public function __call( $sMethodName, $aArgs=null ) { |
|
115 | 115 | |
116 | 116 | $_sPageSlug = $this->oProp->getCurrentPageSlug(); |
117 | 117 | $_sTabSlug = $this->oProp->getCurrentTabSlug( $_sPageSlug ); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | // Note that if the tab is the first item and the user arrives the page by clicking on the sidebar menu, |
198 | 198 | // the tab slug will be empty unless an in-page tab is added. |
199 | 199 | $sTabSlug = $this->oProp->getCurrentTabSlug( $sPageSlug ); |
200 | - if ( strlen( $sTabSlug ) ) { |
|
200 | + if ( strlen( $sTabSlug ) ) { |
|
201 | 201 | $this->_setShowDebugInfoProperty( $sPageSlug, $sTabSlug ); // 3.8.8+ |
202 | 202 | $this->oUtil->addAndDoActions( |
203 | 203 | $this, // the caller object |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | return true; |
328 | 328 | } |
329 | 329 | |
330 | - if ( ! isset( $_GET[ 'page' ] ) ) { |
|
330 | + if ( ! isset( $_GET[ 'page' ] ) ) { |
|
331 | 331 | return false; |
332 | 332 | } |
333 | 333 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function __construct( $oFactory ) { |
30 | 30 | |
31 | - $this->oFactory = $oFactory; |
|
31 | + $this->oFactory = $oFactory; |
|
32 | 32 | |
33 | 33 | // wp_mail() will be loaded by the time 'after_setup_theme' is loaded. |
34 | 34 | // @deprecated 3.7.0 |
@@ -52,18 +52,18 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function _replyToCheckRedirects() { |
54 | 54 | |
55 | - if ( ! $this->_shouldProceed() ) { |
|
55 | + if ( !$this->_shouldProceed() ) { |
|
56 | 56 | return; |
57 | 57 | } |
58 | 58 | |
59 | 59 | // The redirect transient key. |
60 | - $_sTransient = 'apf_rurl' . md5( |
|
61 | - trim( "redirect_{$this->oFactory->oProp->sClassName}_{$_GET['page']}" ) |
|
60 | + $_sTransient = 'apf_rurl'.md5( |
|
61 | + trim( "redirect_{$this->oFactory->oProp->sClassName}_{$_GET[ 'page' ]}" ) |
|
62 | 62 | ); |
63 | 63 | |
64 | 64 | // Check the settings error transient. |
65 | 65 | $_aError = $this->oFactory->getFieldErrors(); |
66 | - if ( ! empty( $_aError ) ) { |
|
66 | + if ( !empty( $_aError ) ) { |
|
67 | 67 | $this->deleteTransient( $_sTransient ); // we don't need it any more. |
68 | 68 | return; |
69 | 69 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | private function _shouldProceed() { |
91 | 91 | |
92 | 92 | // Check if it's one of the plugin's added page. If not, do nothing. |
93 | - if ( ! $this->oFactory->isInThePage() ) { |
|
93 | + if ( !$this->oFactory->isInThePage() ) { |
|
94 | 94 | return false; |
95 | 95 | } |
96 | 96 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | 'settings-updated', |
104 | 104 | false |
105 | 105 | ); |
106 | - if ( ! $_bsSettingsUpdatedFlag ) { |
|
106 | + if ( !$_bsSettingsUpdatedFlag ) { |
|
107 | 107 | return false; |
108 | 108 | } |
109 | 109 |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | */ |
218 | 218 | public $aDisallowedQueryKeys = array( |
219 | 219 | 'settings-updated', |
220 | - 'confirmation', // 3.3.0+ |
|
220 | + 'confirmation', // 3.3.0+ |
|
221 | 221 | 'field_errors' // 3.4.1+ |
222 | 222 | ); |
223 | 223 | |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | * Stores the cache lifetime of the transient used for the form options when the user passes an integer to the option key parameter. |
264 | 264 | * @since 3.5.9 |
265 | 265 | */ |
266 | - public $iOptionTransientDuration = 0; |
|
266 | + public $iOptionTransientDuration = 0; |
|
267 | 267 | |
268 | 268 | /** |
269 | 269 | * Constructs the instance of AdminPageFramework_Property_admin_page class object. |
@@ -272,10 +272,10 @@ discard block |
||
272 | 272 | * @since 2.0.0 |
273 | 273 | * @since 2.1.5 The $oCaller parameter was added. |
274 | 274 | */ |
275 | - public function __construct( $oCaller, $sCallerPath, $sClassName, $aisOptionKey, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
275 | + public function __construct( $oCaller, $sCallerPath, $sClassName, $aisOptionKey, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) { |
|
276 | 276 | |
277 | 277 | // 3.7.0+ This must be set before the parent constructor. As the form arguments array uses this value. |
278 | - $this->_sFormRegistrationHook = 'load_after_' . $sClassName; |
|
278 | + $this->_sFormRegistrationHook = 'load_after_'.$sClassName; |
|
279 | 279 | |
280 | 280 | parent::__construct( |
281 | 281 | $oCaller, |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | } |
352 | 352 | // The user want to save options in a transient. |
353 | 353 | if ( in_array( $_sType, array( 'integer' ) ) ) { |
354 | - return 'apf_' . md5( site_url() . '_' . $sClassName . '_' . get_current_user_id() ); |
|
354 | + return 'apf_'.md5( site_url().'_'.$sClassName.'_'.get_current_user_id() ); |
|
355 | 355 | } |
356 | 356 | |
357 | 357 | // Unknown type - maybe the user is trying to do something advanced. |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | */ |
379 | 379 | protected function _isAdminPage() { |
380 | 380 | |
381 | - if ( ! is_admin() ) { |
|
381 | + if ( !is_admin() ) { |
|
382 | 382 | return false; |
383 | 383 | } |
384 | 384 | return isset( $_GET[ 'page' ] ); |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | case 'transient': |
419 | 419 | return $this->getAsArray( |
420 | 420 | $this->getTransient( |
421 | - $this->sOptionKey, // transient key |
|
421 | + $this->sOptionKey, // transient key |
|
422 | 422 | array() // default |
423 | 423 | ) |
424 | 424 | ); |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | * @since 3.1.1 Made it return a value. |
433 | 433 | * @return boolean True if saved; otherwise, false. |
434 | 434 | */ |
435 | - public function updateOption( $aOptions=null ) { |
|
435 | + public function updateOption( $aOptions = null ) { |
|
436 | 436 | |
437 | 437 | if ( $this->_bDisableSavingOptions ) { |
438 | 438 | return false; |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | ); |
461 | 461 | case 'transient': |
462 | 462 | return $this->setTransient( |
463 | - $this->sOptionKey, // transient key |
|
463 | + $this->sOptionKey, // transient key |
|
464 | 464 | $aOptions, |
465 | 465 | $this->iOptionTransientDuration |
466 | 466 | ); |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | * @since 2.1.0 Set the default value to the parameter and if the parameter value is empty, it applies the current $_GET[ 'page' ] value. |
476 | 476 | * @return boolean Returns true if it is of framework's added page; otherwise, false. |
477 | 477 | */ |
478 | - public function isPageAdded( $sPageSlug='' ) { |
|
478 | + public function isPageAdded( $sPageSlug = '' ) { |
|
479 | 479 | |
480 | 480 | $sPageSlug = trim( $sPageSlug ); |
481 | 481 | $sPageSlug = $sPageSlug |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | * @return string The found tab slug. An empty string if not found. |
513 | 513 | * @remark Do not return `null` when not found as some framework methods check the returned value with `isset()` and if null is given, `isset()` yields `false` while it does `true` for an empty string (''). |
514 | 514 | */ |
515 | - public function getCurrentTabSlug( $sCurrentPageSlug='' ) { |
|
515 | + public function getCurrentTabSlug( $sCurrentPageSlug = '' ) { |
|
516 | 516 | |
517 | 517 | // It is possible that the tab slug is not set if it is the default tab. |
518 | 518 | $_sTabSlug = $this->getElement( $this->aQuery, 'tab', '' ); |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | * |
533 | 533 | * @deprecated 3.5.3 |
534 | 534 | */ |
535 | - public function getCurrentTab( $sCurrentPageSlug='' ) { |
|
535 | + public function getCurrentTab( $sCurrentPageSlug = '' ) { |
|
536 | 536 | return $this->getCurrentTabSlug( $sCurrentPageSlug ); |
537 | 537 | } |
538 | 538 | |
@@ -547,11 +547,11 @@ discard block |
||
547 | 547 | */ |
548 | 548 | public function getDefaultInPageTab( $sPageSlug ) { |
549 | 549 | |
550 | - if ( ! $sPageSlug ) { |
|
550 | + if ( !$sPageSlug ) { |
|
551 | 551 | return ''; |
552 | 552 | } |
553 | 553 | return $this->getElement( |
554 | - $this->aDefaultInPageTabs, // subject array |
|
554 | + $this->aDefaultInPageTabs, // subject array |
|
555 | 555 | $sPageSlug, // key |
556 | 556 | '' // default |
557 | 557 | ); |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | * @since 3.5.9 |
313 | 313 | * @return void |
314 | 314 | */ |
315 | - private function _setOptionsProperties( $aisOptionKey, $sClassName ) { |
|
315 | + private function _setOptionsProperties( $aisOptionKey, $sClassName ) { |
|
316 | 316 | |
317 | 317 | $_aArguments = is_array( $aisOptionKey ) |
318 | 318 | ? $aisOptionKey |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | * @since 2.1.0 Set the default value to the parameter and if the parameter value is empty, it applies the current $_GET[ 'page' ] value. |
476 | 476 | * @return boolean Returns true if it is of framework's added page; otherwise, false. |
477 | 477 | */ |
478 | - public function isPageAdded( $sPageSlug='' ) { |
|
478 | + public function isPageAdded( $sPageSlug='' ) { |
|
479 | 479 | |
480 | 480 | $sPageSlug = trim( $sPageSlug ); |
481 | 481 | $sPageSlug = $sPageSlug |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | |
517 | 517 | // It is possible that the tab slug is not set if it is the default tab. |
518 | 518 | $_sTabSlug = $this->getElement( $this->aQuery, 'tab', '' ); |
519 | - if ( $_sTabSlug ) { |
|
519 | + if ( $_sTabSlug ) { |
|
520 | 520 | return $_sTabSlug; |
521 | 521 | } |
522 | 522 | $sCurrentPageSlug = $sCurrentPageSlug |
@@ -29,7 +29,7 @@ |
||
29 | 29 | public function _replyToRegisterHelpTabText() { |
30 | 30 | |
31 | 31 | // Check if the currently loaded page is of meta box page. |
32 | - if ( ! $this->oProp->oCaller->isInThePage() ) { |
|
32 | + if ( !$this->oProp->oCaller->isInThePage() ) { |
|
33 | 33 | return false; |
34 | 34 | } |
35 | 35 |