@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | ) |
64 | 64 | ); |
65 | 65 | |
66 | - if ( ! $this->_isEnabled( $_aTab ) ) { |
|
66 | + if ( !$this->_isEnabled( $_aTab ) ) { |
|
67 | 67 | return array(); |
68 | 68 | } |
69 | 69 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | : esc_url( |
78 | 78 | $this->getElement( |
79 | 79 | $_aTab, |
80 | - 'url', // if the 'url' argument is set, use it. Otherwise, use the below gnerated url. |
|
80 | + 'url', // if the 'url' argument is set, use it. Otherwise, use the below gnerated url. |
|
81 | 81 | $this->getQueryAdminURL( |
82 | 82 | array( |
83 | 83 | 'page' => $this->aArguments[ 'page_slug' ], |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * @return boolean |
107 | 107 | */ |
108 | 108 | private function _isEnabled( $aTab ) { |
109 | - return ! in_array( |
|
109 | + return !in_array( |
|
110 | 110 | false, |
111 | 111 | array( |
112 | 112 | ( bool ) current_user_can( $aTab[ 'capability' ] ), // whether the user has the sufficient capability level |
@@ -23,12 +23,12 @@ discard block |
||
23 | 23 | * @static |
24 | 24 | */ |
25 | 25 | static public $aStructure = array( |
26 | - 'src' => null, // (required, string) the source url or path |
|
26 | + 'src' => null, // (required, string) the source url or path |
|
27 | 27 | 'handle_id' => null, |
28 | 28 | 'dependencies' => array(), |
29 | - 'version' => false, // although the type should be string, the wp_enqueue_...() functions want false as the default value. |
|
30 | - 'translation' => array(), // only for scripts |
|
31 | - 'in_footer' => false, // only for scripts |
|
29 | + 'version' => false, // although the type should be string, the wp_enqueue_...() functions want false as the default value. |
|
30 | + 'translation' => array(), // only for scripts |
|
31 | + 'in_footer' => false, // only for scripts |
|
32 | 32 | // 'attributes' => null, // (optional, array) [3.3.0+] attributes array. `array( 'data-id' => '...' )` |
33 | 33 | ); |
34 | 34 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $_aParameters = func_get_args() + array( |
42 | 42 | $this->asSubject, |
43 | 43 | ); |
44 | - $this->asSubject = $_aParameters[ 0 ]; |
|
44 | + $this->asSubject = $_aParameters[ 0 ]; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -23,11 +23,11 @@ discard block |
||
23 | 23 | * @static |
24 | 24 | */ |
25 | 25 | static public $aStructure = array( |
26 | - 'src' => null, // (required, string) the source url or path |
|
27 | - 'handle_id' => null, // (optional, string) The handle ID of the stylesheet |
|
28 | - 'dependencies' => null, // (optional, array) The dependency array. |
|
29 | - 'version' => null, // (optional, string) The stylesheet version number. |
|
30 | - 'media' => null, // (optional, string) the description of the field which is inserted into the after the input field tag. |
|
26 | + 'src' => null, // (required, string) the source url or path |
|
27 | + 'handle_id' => null, // (optional, string) The handle ID of the stylesheet |
|
28 | + 'dependencies' => null, // (optional, array) The dependency array. |
|
29 | + 'version' => null, // (optional, string) The stylesheet version number. |
|
30 | + 'media' => null, // (optional, string) the description of the field which is inserted into the after the input field tag. |
|
31 | 31 | // 'attributes' => null, // (optional, array) [3.3.0+] attributes array. `array( 'data-id' => '...' )` |
32 | 32 | ); |
33 | 33 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $_aParameters = func_get_args() + array( |
41 | 41 | $this->asSubject, |
42 | 42 | ); |
43 | - $this->asSubject = $_aParameters[ 0 ]; |
|
43 | + $this->asSubject = $_aParameters[ 0 ]; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -18,7 +18,6 @@ |
||
18 | 18 | |
19 | 19 | /** |
20 | 20 | * Represents the structure of the sub-field definition array. |
21 | - |
|
22 | 21 | */ |
23 | 22 | static public $aStructure = array( |
24 | 23 | ); |
@@ -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 | /** |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | |
57 | 57 | } |
58 | 58 | |
59 | - private function getElementInFilesArray( array $aFilesImport, $sInputID, $sElementKey='error' ) { |
|
59 | + private function getElementInFilesArray( array $aFilesImport, $sInputID, $sElementKey = 'error' ) { |
|
60 | 60 | |
61 | 61 | $sElementKey = strtolower( $sElementKey ); |
62 | 62 | return $this->getElement( |
63 | - $aFilesImport, // subject array |
|
63 | + $aFilesImport, // subject array |
|
64 | 64 | array( $sElementKey, $sInputID ), // dimensional keys |
65 | 65 | null // default |
66 | 66 | ); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | return $vData; |
89 | 89 | |
90 | 90 | } |
91 | - public function formatImportData( &$vData, $sFormatType=null ) { |
|
91 | + public function formatImportData( &$vData, $sFormatType = null ) { |
|
92 | 92 | |
93 | 93 | $sFormatType = isset( $sFormatType ) ? $sFormatType : $this->getFormatType(); |
94 | 94 | switch ( strtolower( $sFormatType ) ) { |
@@ -51,16 +51,16 @@ discard block |
||
51 | 51 | public function getPageOnlyOptions( $aOptions, $sPageSlug ) { |
52 | 52 | |
53 | 53 | $_aStoredOptionsOfThePage = array(); |
54 | - foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
54 | + foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
55 | 55 | |
56 | 56 | // Check the section |
57 | - if ( ! $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) { |
|
57 | + if ( !$this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) { |
|
58 | 58 | continue; |
59 | 59 | } |
60 | 60 | |
61 | 61 | // At this point, the element belongs the given page slug as the section is of the given page slug's. |
62 | 62 | $this->_setPageOnlyOptions( |
63 | - $_aStoredOptionsOfThePage, // by reference - gets updated in the method. |
|
63 | + $_aStoredOptionsOfThePage, // by reference - gets updated in the method. |
|
64 | 64 | $aOptions, |
65 | 65 | $_aSubSectionsOrFields, |
66 | 66 | $sPageSlug, |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * @internal |
81 | 81 | */ |
82 | 82 | private function _setPageOnlyOptions( array &$_aStoredOptionsOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug, $_sSectionID ) { |
83 | - foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
83 | + foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
84 | 84 | |
85 | 85 | // If it's a sub-section array, |
86 | 86 | if ( $this->isNumericInteger( $_sFieldID ) ) { |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | public function getOtherPageOptions( $aOptions, $sPageSlug ) { |
153 | 153 | |
154 | 154 | $_aStoredOptionsNotOfThePage = array(); |
155 | - foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
155 | + foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
156 | 156 | |
157 | 157 | // Check the section |
158 | 158 | if ( $this->_isThisSectionSetToThisPage( $_sSectionID, $sPageSlug ) ) { |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | * @internal |
182 | 182 | */ |
183 | 183 | private function _setOtherPageOptions( array &$_aStoredOptionsNotOfThePage, array $aOptions, array $_aSubSectionsOrFields, $sPageSlug ) { |
184 | - foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
184 | + foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
185 | 185 | |
186 | 186 | // It's a sub-section array. |
187 | 187 | if ( $this->isNumericInteger( $_sFieldID ) ) { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | public function getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug ) { |
245 | 245 | |
246 | 246 | $_aStoredOptionsNotOfTheTab = array(); |
247 | - foreach( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) { |
|
247 | + foreach ( $this->aFieldsets as $_sSectionPath => $_aSubSectionsOrFields ) { |
|
248 | 248 | |
249 | 249 | // If the section is of the given page and the given tab, skip. |
250 | 250 | if ( $this->_isThisSectionSetToThisTab( $_sSectionPath, $sPageSlug, $sTabSlug ) ) { |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | private function _setOtherTabOptions( array &$_aStoredOptionsNotOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $sSectionPath ) { |
276 | 276 | |
277 | 277 | // At this point, the passed element belongs to the other tabs since the section of the given tab is skipped. |
278 | - foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
278 | + foreach ( $_aSubSectionsOrFields as $_isSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
279 | 279 | |
280 | 280 | // If it's a sub section |
281 | 281 | if ( $this->isNumericInteger( $_isSubSectionIndexOrFieldID ) ) { |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | * @since 3.7.0 Moved from `AdminPageFramework_FormDefinition_Page`. |
334 | 334 | * @return array |
335 | 335 | */ |
336 | - public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug='' ) { |
|
336 | + public function getTabOptions( $aOptions, $sPageSlug, $sTabSlug = '' ) { |
|
337 | 337 | |
338 | 338 | $_aOtherTabOptions = $this->getOtherTabOptions( $aOptions, $sPageSlug, $sTabSlug ); |
339 | 339 | $_aTabOptions = $this->invertCastArrayContents( $aOptions, $_aOtherTabOptions ); |
@@ -351,17 +351,17 @@ discard block |
||
351 | 351 | * @since 3.7.0 Moved from `AdminPageFramework_FormDefinition_Page`. |
352 | 352 | * @return array |
353 | 353 | */ |
354 | - public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug='' ) { |
|
354 | + public function getTabOnlyOptions( array $aOptions, $sPageSlug, $sTabSlug = '' ) { |
|
355 | 355 | |
356 | 356 | $_aStoredOptionsOfTheTab = array(); |
357 | - if ( ! $sTabSlug ) { |
|
357 | + if ( !$sTabSlug ) { |
|
358 | 358 | return $_aStoredOptionsOfTheTab; |
359 | 359 | } |
360 | 360 | |
361 | - foreach( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
361 | + foreach ( $this->aFieldsets as $_sSectionID => $_aSubSectionsOrFields ) { |
|
362 | 362 | |
363 | 363 | // Check the section |
364 | - if ( ! $this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) { |
|
364 | + if ( !$this->_isThisSectionSetToThisTab( $_sSectionID, $sPageSlug, $sTabSlug ) ) { |
|
365 | 365 | continue; |
366 | 366 | } |
367 | 367 | |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | */ |
388 | 388 | private function _setTabOnlyOptions( array &$_aStoredOptionsOfTheTab, array $aOptions, array $_aSubSectionsOrFields, $_sSectionID ) { |
389 | 389 | |
390 | - foreach( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
390 | + foreach ( $_aSubSectionsOrFields as $_sFieldID => $_aFieldset ) { |
|
391 | 391 | |
392 | 392 | // if it's a sub-section array. |
393 | 393 | if ( $this->isNumericInteger( $_sFieldID ) ) { |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | */ |
445 | 445 | private function _isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) { |
446 | 446 | |
447 | - if ( ! isset( $this->aSectionsets[ $sSectionPath ][ 'page_slug' ] ) ) { |
|
447 | + if ( !isset( $this->aSectionsets[ $sSectionPath ][ 'page_slug' ] ) ) { |
|
448 | 448 | return false; |
449 | 449 | } |
450 | 450 | return ( |
@@ -462,10 +462,10 @@ discard block |
||
462 | 462 | */ |
463 | 463 | private function _isThisSectionSetToThisTab( $sSectionPath, $sPageSlug, $sTabSlug ) { |
464 | 464 | |
465 | - if ( ! $this->_isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) ) { |
|
465 | + if ( !$this->_isThisSectionSetToThisPage( $sSectionPath, $sPageSlug ) ) { |
|
466 | 466 | return false; |
467 | 467 | } |
468 | - if ( ! isset( $this->aSectionsets[ $sSectionPath ][ 'tab_slug' ] ) ) { |
|
468 | + if ( !isset( $this->aSectionsets[ $sSectionPath ][ 'tab_slug' ] ) ) { |
|
469 | 469 | return false; |
470 | 470 | } |
471 | 471 | return ( |
@@ -482,9 +482,9 @@ discard block |
||
482 | 482 | */ |
483 | 483 | private function _setOptionValue( &$aSubject, $asDimensionalPath, $aOptions ) { |
484 | 484 | $_aDimensionalPath = $this->getAsArray( $asDimensionalPath ); |
485 | - $_mValue = $this->getElement( |
|
485 | + $_mValue = $this->getElement( |
|
486 | 486 | $aOptions, |
487 | - $_aDimensionalPath, // as of 3.7.0, it can be an array or string |
|
487 | + $_aDimensionalPath, // as of 3.7.0, it can be an array or string |
|
488 | 488 | null |
489 | 489 | ); |
490 | 490 | if ( isset( $_mValue ) ) { |
@@ -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 | } |
@@ -74,7 +74,8 @@ |
||
74 | 74 | // new AdminPageFramework_Model__FormEmailHandler( $this ); |
75 | 75 | |
76 | 76 | // Checking the GET and POST methods. |
77 | - if ( isset( $_REQUEST[ 'apf_remote_request_test' ] ) && '_testing' === $_REQUEST[ 'apf_remote_request_test' ] ) { // sanitization unnecessary |
|
77 | + if ( isset( $_REQUEST[ 'apf_remote_request_test' ] ) && '_testing' === $_REQUEST[ 'apf_remote_request_test' ] ) { |
|
78 | +// sanitization unnecessary |
|
78 | 79 | exit( 'OK' ); |
79 | 80 | } |
80 | 81 |
@@ -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 |