@@ -30,15 +30,15 @@ |
||
30 | 30 | 'page_slug' => null, |
31 | 31 | 'tab_slug' => null, |
32 | 32 | 'title' => null, |
33 | - 'order' => 10, // (integer) |
|
34 | - 'show_in_page_tab' => true, // 3.6.0+ (boolean) |
|
35 | - '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. |
|
36 | - 'url' => null, // 3.5.0+ This allows the user set custom link. |
|
37 | - 'disabled' => null, // 3.5.10+ (boolean) If true, the link will be unlinked. |
|
38 | - 'attributes' => null, // 3.5.10+ (array) Applies to the navigation tab bar element. |
|
39 | - 'capability' => null, // 3.6.0+ (string) |
|
40 | - 'if' => true, // 3.6.0+ (boolean) |
|
41 | - '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. |
|
33 | + 'order' => 10, // (integer) |
|
34 | + 'show_in_page_tab' => true, // 3.6.0+ (boolean) |
|
35 | + '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. |
|
36 | + 'url' => null, // 3.5.0+ This allows the user set custom link. |
|
37 | + 'disabled' => null, // 3.5.10+ (boolean) If true, the link will be unlinked. |
|
38 | + 'attributes' => null, // 3.5.10+ (array) Applies to the navigation tab bar element. |
|
39 | + 'capability' => null, // 3.6.0+ (string) |
|
40 | + 'if' => true, // 3.6.0+ (boolean) |
|
41 | + '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. |
|
42 | 42 | ); |
43 | 43 | |
44 | 44 | /** |
@@ -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 | ); |
@@ -63,7 +63,7 @@ |
||
63 | 63 | * @return void |
64 | 64 | * @internal |
65 | 65 | */ |
66 | - protected function _renderPage( $sPageSlug, $sTabSlug=null ) { |
|
66 | + protected function _renderPage( $sPageSlug, $sTabSlug = null ) { |
|
67 | 67 | $_oPageRenderer = new AdminPageFramework_View__PageRenderer( $this, $sPageSlug, $sTabSlug ); |
68 | 68 | $_oPageRenderer->render(); |
69 | 69 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * @since 3.3.0 |
59 | 59 | * @since 3.3.1 Moved from `AdminPageFramework_Setting_Base`. |
60 | 60 | */ |
61 | - public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
61 | + public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) { |
|
62 | 62 | |
63 | 63 | parent::__construct( $sOptionKey, $sCallerPath, $sCapability, $sTextDomain ); |
64 | 64 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | // if ( $this->oProp->bIsAdminAjax ) { |
67 | 67 | // return; |
68 | 68 | // } |
69 | - if ( ! $this->oProp->bIsAdmin ) { |
|
69 | + if ( !$this->oProp->bIsAdmin ) { |
|
70 | 70 | return; |
71 | 71 | } |
72 | 72 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | 'section_title' => null, |
117 | 117 | 'section_id' => null, |
118 | 118 | ); |
119 | - if ( ! $aFieldset[ 'help' ] ) { |
|
119 | + if ( !$aFieldset[ 'help' ] ) { |
|
120 | 120 | return; |
121 | 121 | } |
122 | 122 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | 'help_tab_id' => $_sRootSectionID, |
135 | 135 | 'help_tab_content' => "<span class='contextual-help-tab-title'>" |
136 | 136 | . $aFieldset[ 'title' ] |
137 | - . "</span> - " . PHP_EOL |
|
137 | + . "</span> - ".PHP_EOL |
|
138 | 138 | . $aFieldset[ 'help' ], |
139 | 139 | 'help_tab_sidebar_content' => $aFieldset[ 'help_aside' ] |
140 | 140 | ? $aFieldset[ 'help_aside' ] |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | public function _registerHelpPaneItemsOfFormSections( $aSectionsets ) { |
169 | 169 | // @todo Test if help pane item gets displayed |
170 | 170 | |
171 | - foreach( $aSectionsets as $_aSectionset ) { |
|
171 | + foreach ( $aSectionsets as $_aSectionset ) { |
|
172 | 172 | // @todo check capability and conditions |
173 | 173 | $_aSectionset = $_aSectionset + array( |
174 | 174 | 'help' => null, |
@@ -202,13 +202,13 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public function _replyToDetermineSectionsetVisibility( $bVisible, $aSectionset ) { |
204 | 204 | |
205 | - if ( ! current_user_can( $aSectionset[ 'capability' ] ) ) { |
|
205 | + if ( !current_user_can( $aSectionset[ 'capability' ] ) ) { |
|
206 | 206 | return false; |
207 | 207 | } |
208 | - if ( ! $aSectionset[ 'if' ] ) { |
|
208 | + if ( !$aSectionset[ 'if' ] ) { |
|
209 | 209 | return false; |
210 | 210 | } |
211 | - if ( ! $this->_isSectionOfCurrentPage( $aSectionset ) ) { |
|
211 | + if ( !$this->_isSectionOfCurrentPage( $aSectionset ) ) { |
|
212 | 212 | return false; |
213 | 213 | } |
214 | 214 | return $bVisible; |
@@ -226,15 +226,15 @@ discard block |
||
226 | 226 | private function _isSectionOfCurrentPage( array $aSectionset ) { |
227 | 227 | |
228 | 228 | // Make sure the value type is string so that when the page_slug is not set, it won't match. |
229 | - $_sCurrentPageSlug = ( string ) $this->oProp->getCurrentPageSlug(); |
|
229 | + $_sCurrentPageSlug = ( string ) $this->oProp->getCurrentPageSlug(); |
|
230 | 230 | |
231 | 231 | // Make sure if it's in the loading page. |
232 | - if ( $aSectionset[ 'page_slug' ] !== $_sCurrentPageSlug ) { |
|
232 | + if ( $aSectionset[ 'page_slug' ] !== $_sCurrentPageSlug ) { |
|
233 | 233 | return false; |
234 | 234 | } |
235 | 235 | |
236 | 236 | // If no tag is specified, the user wants to display the section regardless of the tab. |
237 | - if ( ! $aSectionset[ 'tab_slug' ] ) { |
|
237 | + if ( !$aSectionset[ 'tab_slug' ] ) { |
|
238 | 238 | return true; |
239 | 239 | } |
240 | 240 | |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | */ |
251 | 251 | public function _replyToDetermineFieldsetVisibility( $bVisible, $aFieldset ) { |
252 | 252 | |
253 | - $_sCurrentPageSlug = $this->oProp->getCurrentPageSlug(); |
|
253 | + $_sCurrentPageSlug = $this->oProp->getCurrentPageSlug(); |
|
254 | 254 | |
255 | 255 | // If the specified field does not exist, do nothing. |
256 | 256 | if ( $aFieldset[ 'page_slug' ] !== $_sCurrentPageSlug ) { |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | array( $_sSectionPath, 'page_slug' ), |
281 | 281 | $this->oProp->getCurrentPageSlugIfAdded() |
282 | 282 | ); |
283 | - $aFieldset[ 'tab_slug' ] = $this->oUtil->getElement( |
|
283 | + $aFieldset[ 'tab_slug' ] = $this->oUtil->getElement( |
|
284 | 284 | $aSectionsets, |
285 | 285 | array( $_sSectionPath, 'tab_slug' ), |
286 | 286 | $this->oProp->getCurrentInPageTabSlugIfAdded() |
@@ -291,11 +291,11 @@ discard block |
||
291 | 291 | $aSectionsets, |
292 | 292 | $_sSectionPath |
293 | 293 | ); |
294 | - $aFieldset[ 'section_title' ] = $this->oUtil->getElement( |
|
294 | + $aFieldset[ 'section_title' ] = $this->oUtil->getElement( |
|
295 | 295 | $_aSectionset, |
296 | 296 | 'title' |
297 | 297 | ); |
298 | - $aFieldset[ 'capability' ] = $aFieldset[ 'capability' ] |
|
298 | + $aFieldset[ 'capability' ] = $aFieldset[ 'capability' ] |
|
299 | 299 | ? $aFieldset[ 'capability' ] |
300 | 300 | : $this->_replyToGetCapabilityForForm( |
301 | 301 | $this->oUtil->getElement( $_aSectionset, 'capability' ), |
@@ -345,13 +345,13 @@ discard block |
||
345 | 345 | |
346 | 346 | // Find the capability of the parent section if nested. |
347 | 347 | if ( 0 < $aSectionset[ '_nested_depth' ] ) { |
348 | - $_aSectionPath = $aSectionset[ '_section_path_array' ]; |
|
348 | + $_aSectionPath = $aSectionset[ '_section_path_array' ]; |
|
349 | 349 | array_pop( $_aSectionPath ); // remove the last element |
350 | 350 | $_sParentCapability = $this->oUtil->getElement( |
351 | 351 | $this->oForm->aSectionsets, |
352 | 352 | array_merge( $_aSectionPath, array( 'capability' ) ) |
353 | 353 | ); |
354 | - if( $_sParentCapability ) { |
|
354 | + if ( $_sParentCapability ) { |
|
355 | 355 | return $_sParentCapability; |
356 | 356 | } |
357 | 357 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * |
25 | 25 | * @internal |
26 | 26 | */ |
27 | - public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
27 | + public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) { |
|
28 | 28 | |
29 | 29 | parent::__construct( $sOptionKey, $sCallerPath, $sCapability, $sTextDomain ); |
30 | 30 |
@@ -67,9 +67,9 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function _appendInternalAssets( $sInternal, &$aContainer ) { |
69 | 69 | $_aInternals = array_unique( $aContainer ); |
70 | - $sInternal = PHP_EOL . $sInternal; |
|
71 | - foreach( $_aInternals as $_iIndex => $_sInternal ) { |
|
72 | - $sInternal .= $_sInternal . PHP_EOL; |
|
70 | + $sInternal = PHP_EOL.$sInternal; |
|
71 | + foreach ( $_aInternals as $_iIndex => $_sInternal ) { |
|
72 | + $sInternal .= $_sInternal.PHP_EOL; |
|
73 | 73 | unset( $_aInternals[ $_iIndex ] ); |
74 | 74 | } |
75 | 75 | $aContainer = $_aInternals; // update the container array. |
@@ -83,23 +83,23 @@ discard block |
||
83 | 83 | private function _parseAssets( $oFactory ) { |
84 | 84 | |
85 | 85 | // page |
86 | - $_aPageStyles = $this->getElementAsArray( |
|
86 | + $_aPageStyles = $this->getElementAsArray( |
|
87 | 87 | $oFactory->oProp->aPages, |
88 | 88 | array( $this->sCurrentPageSlug, 'style' ) |
89 | 89 | ); |
90 | 90 | $this->_enqueuePageAssets( $_aPageStyles, 'style' ); |
91 | 91 | |
92 | - $_aPageScripts = $this->getElementAsArray( |
|
92 | + $_aPageScripts = $this->getElementAsArray( |
|
93 | 93 | $oFactory->oProp->aPages, |
94 | 94 | array( $this->sCurrentPageSlug, 'script' ) |
95 | 95 | ); |
96 | 96 | $this->_enqueuePageAssets( $_aPageScripts, 'script' ); |
97 | 97 | |
98 | 98 | // In-page tabs |
99 | - if ( ! $this->sCurrentTabSlug ) { |
|
99 | + if ( !$this->sCurrentTabSlug ) { |
|
100 | 100 | return; |
101 | 101 | } |
102 | - $_aInPageTabStyles = $this->getElementAsArray( |
|
102 | + $_aInPageTabStyles = $this->getElementAsArray( |
|
103 | 103 | $oFactory->oProp->aInPageTabs, |
104 | 104 | array( $this->sCurrentPageSlug, $this->sCurrentTabSlug, 'style' ) |
105 | 105 | ); |
@@ -116,10 +116,10 @@ discard block |
||
116 | 116 | * @since 3.6.3 |
117 | 117 | * @return void |
118 | 118 | */ |
119 | - private function _enqueuePageAssets( array $aPageAssets, $sType='style' ) { |
|
120 | - $_sMathodName = "_enqueueAsset_" . $sType; |
|
121 | - foreach( $aPageAssets as $_asPageAsset ) { |
|
122 | - $this->{$_sMathodName}( $_asPageAsset); |
|
119 | + private function _enqueuePageAssets( array $aPageAssets, $sType = 'style' ) { |
|
120 | + $_sMathodName = "_enqueueAsset_".$sType; |
|
121 | + foreach ( $aPageAssets as $_asPageAsset ) { |
|
122 | + $this->{$_sMathodName}( $_asPageAsset ); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | // Insert the CSS rule in the head tag. |
147 | - $this->aCSSRules[] = $_sSRC; |
|
147 | + $this->aCSSRules[ ] = $_sSRC; |
|
148 | 148 | |
149 | 149 | } |
150 | 150 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | // Insert the scripts in the head tag. |
172 | - $this->aScripts[] = $_sSRC; |
|
172 | + $this->aScripts[ ] = $_sSRC; |
|
173 | 173 | |
174 | 174 | } |
175 | 175 |
@@ -149,7 +149,7 @@ |
||
149 | 149 | * @since 3.5.3 |
150 | 150 | * @return string The found page slug. An empty string if not found. |
151 | 151 | * @remark Do not return `null` when not found as some framework methods check the retuened value with `isset()` and if null is given, `isset()` yields `false` while it does `true` for an emtpy string (''). |
152 | - */ |
|
152 | + */ |
|
153 | 153 | public function getCurrentPageSlug() { |
154 | 154 | return isset( $_GET[ 'page' ] ) |
155 | 155 | ? $_GET[ 'page' ] |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | /** |
57 | 57 | * Sets up hooks and properties. |
58 | 58 | */ |
59 | - public function __construct( $oCaller, $sClassName, $sCapability='manage_options', $sTextDomain='admin-page-framework', $sStructureType='page_meta_box' ) { |
|
59 | + public function __construct( $oCaller, $sClassName, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework', $sStructureType = 'page_meta_box' ) { |
|
60 | 60 | |
61 | 61 | // Let them overload. |
62 | 62 | unset( |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | public function _getScreenIDOfPage( $sPageSlug ) { |
106 | 106 | $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ); |
107 | 107 | return $_oAdminPage |
108 | - ? $_oAdminPage->oProp->aPages[ $sPageSlug ][ '_page_hook' ] . ( is_network_admin() ? '-network' : '' ) |
|
108 | + ? $_oAdminPage->oProp->aPages[ $sPageSlug ][ '_page_hook' ].( is_network_admin() ? '-network' : '' ) |
|
109 | 109 | : ''; |
110 | 110 | } |
111 | 111 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * @since 3.0.0 |
116 | 116 | * @return boolean Returns true if it is of framework's added page; otherwise, false. |
117 | 117 | */ |
118 | - public function isPageAdded( $sPageSlug='' ) { |
|
118 | + public function isPageAdded( $sPageSlug = '' ) { |
|
119 | 119 | $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ); |
120 | 120 | return $_oAdminPage |
121 | 121 | ? $_oAdminPage->oProp->isPageAdded( $sPageSlug ) |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | public function isCurrentTab( $sTabSlug ) { |
133 | 133 | |
134 | 134 | $_sCurrentPageSlug = $this->getElement( $_GET, 'page' ); |
135 | - if ( ! $_sCurrentPageSlug ) { |
|
135 | + if ( !$_sCurrentPageSlug ) { |
|
136 | 136 | return false; |
137 | 137 | } |
138 | 138 | $_sCurrentTabSlug = $this->getElement( |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | */ |
186 | 186 | public function getDefaultInPageTab( $sPageSlug ) { |
187 | 187 | |
188 | - if ( ! $sPageSlug ) { |
|
188 | + if ( !$sPageSlug ) { |
|
189 | 189 | return ''; |
190 | 190 | } |
191 | 191 | return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) ) |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | */ |
201 | 201 | public function getOptionKey( $sPageSlug ) { |
202 | 202 | |
203 | - if ( ! $sPageSlug ) { |
|
203 | + if ( !$sPageSlug ) { |
|
204 | 204 | return ''; |
205 | 205 | } |
206 | 206 | return ( $_oAdminPage = $this->_getOwnerObjectOfPage( $sPageSlug ) ) |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | $GLOBALS, |
228 | 228 | array( 'aAdminPageFramework', 'aPageClasses' ) |
229 | 229 | ); |
230 | - foreach( $_aPageClasses as $_oAdminPage ) { |
|
230 | + foreach ( $_aPageClasses as $_oAdminPage ) { |
|
231 | 231 | if ( $_oAdminPage->oProp->isPageAdded( $sPageSlug ) ) { |
232 | 232 | return $_oAdminPage; |
233 | 233 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | public function construct() { |
30 | 30 | |
31 | 31 | add_filter( |
32 | - 'options_' . $this->aArguments[ 'caller_id' ], |
|
32 | + 'options_'.$this->aArguments[ 'caller_id' ], |
|
33 | 33 | array( $this, '_replyToSanitizeSavedFormData' ), |
34 | 34 | 5 // high priority as it must be done earlier |
35 | 35 | ); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | // Extract the meta box field form data (options) from the page form data (options). |
55 | 55 | return $this->castArrayContents( |
56 | - $this->getDataStructureFromAddedFieldsets(), // form data structure generate from fieldsets |
|
56 | + $this->getDataStructureFromAddedFieldsets(), // form data structure generate from fieldsets |
|
57 | 57 | $aSavedFormData |
58 | 58 | ); |
59 | 59 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @since 3.0.0 |
23 | 23 | */ |
24 | - public function enqueueStyles( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) { |
|
24 | + public function enqueueStyles( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) { |
|
25 | 25 | if ( method_exists( $this->oResource, '_enqueueStyles' ) ) { |
26 | 26 | return $this->oResource->_enqueueStyles( $aSRCs, $sPageSlug, $sTabSlug, $aCustomArgs ); |
27 | 27 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | * @param array (optional) The argument array for more advanced parameters. |
38 | 38 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
39 | 39 | */ |
40 | - public function enqueueStyle( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) { |
|
40 | + public function enqueueStyle( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) { |
|
41 | 41 | if ( method_exists( $this->oResource, '_enqueueStyle' ) ) { |
42 | 42 | return $this->oResource->_enqueueStyle( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs ); |
43 | 43 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * |
48 | 48 | * @since 2.1.5 |
49 | 49 | */ |
50 | - public function enqueueScripts( $aSRCs, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) { |
|
50 | + public function enqueueScripts( $aSRCs, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) { |
|
51 | 51 | if ( method_exists( $this->oResource, '_enqueueScripts' ) ) { |
52 | 52 | return $this->oResource->_enqueueScripts( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs ); |
53 | 53 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * @param array (optional) The argument array for more advanced parameters. |
64 | 64 | * @return string The script handle ID. If the passed url is not a valid url string, an empty string will be returned. |
65 | 65 | */ |
66 | - public function enqueueScript( $sSRC, $sPageSlug='', $sTabSlug='', $aCustomArgs=array() ) { |
|
66 | + public function enqueueScript( $sSRC, $sPageSlug = '', $sTabSlug = '', $aCustomArgs = array() ) { |
|
67 | 67 | if ( method_exists( $this->oResource, '_enqueueScript' ) ) { |
68 | 68 | return $this->oResource->_enqueueScript( $sSRC, $sPageSlug, $sTabSlug, $aCustomArgs ); |
69 | 69 | } |