@@ -56,7 +56,7 @@ |
||
56 | 56 | * @param string $sCapability (optional) sets the overall access level to the admin pages created by the framework. The used capabilities are listed <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. The capability can be set per page, tab, setting section, setting field. Default: `manage_options` |
57 | 57 | * @param string $sTextDomain (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: admin-page-framework. |
58 | 58 | */ |
59 | - public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ){ |
|
59 | + public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) { |
|
60 | 60 | |
61 | 61 | if ( ! $this->_isInstantiatable() ) { |
62 | 62 | return; |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | * @param string $sCapability (optional) sets the overall access level to the admin pages created by the framework. The used capabilities are listed <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. The capability can be set per page, tab, setting section, setting field. Default: `manage_options` |
69 | 69 | * @param string $sTextDomain (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: admin-page-framework. |
70 | 70 | */ |
71 | - public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ){ |
|
71 | + public function __construct( $isOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) { |
|
72 | 72 | |
73 | - if ( ! $this->_isInstantiatable() ) { |
|
73 | + if ( !$this->_isInstantiatable() ) { |
|
74 | 74 | return; |
75 | 75 | } |
76 | 76 | |
@@ -90,19 +90,19 @@ discard block |
||
90 | 90 | */ |
91 | 91 | private function _getCallerPath( $sCallerPath ) { |
92 | 92 | |
93 | - if ( $sCallerPath ) { |
|
93 | + if ( $sCallerPath ) { |
|
94 | 94 | return trim( $sCallerPath ); |
95 | 95 | } |
96 | 96 | |
97 | - if ( ! is_admin() ) { |
|
97 | + if ( !is_admin() ) { |
|
98 | 98 | return null; |
99 | 99 | } |
100 | 100 | |
101 | - if ( ! isset( $GLOBALS[ 'pagenow' ] ) ) { |
|
101 | + if ( !isset( $GLOBALS[ 'pagenow' ] ) ) { |
|
102 | 102 | return null; |
103 | 103 | } |
104 | 104 | |
105 | - $_sCalllerPath = in_array( $GLOBALS[ 'pagenow' ], array( 'plugins.php', ) ) || isset( $_GET[ 'page' ] ) |
|
105 | + $_sCalllerPath = in_array( $GLOBALS[ 'pagenow' ], array( 'plugins.php',) ) || isset( $_GET[ 'page' ] ) |
|
106 | 106 | ? AdminPageFramework_Utility::getCallerScriptPath( __FILE__ ) // not using $oUtil as this method is caller earlier than the base constructor. |
107 | 107 | : null; |
108 | 108 |
@@ -46,12 +46,12 @@ |
||
46 | 46 | * @return null|string Returns `null` if no value is found and the associated link url if found. |
47 | 47 | * Otherwise, the found value. |
48 | 48 | */ |
49 | - protected function _getPressedSubmitButtonData( array $aPostElements, $sTargetKey='field_id' ) { |
|
49 | + protected function _getPressedSubmitButtonData( array $aPostElements, $sTargetKey = 'field_id' ) { |
|
50 | 50 | |
51 | - foreach( $aPostElements as $_sInputID => $_aSubElements ) { |
|
51 | + foreach ( $aPostElements as $_sInputID => $_aSubElements ) { |
|
52 | 52 | |
53 | 53 | // The 'name' key must be set. |
54 | - if ( ! isset( $_aSubElements[ 'name' ] ) ) { |
|
54 | + if ( !isset( $_aSubElements[ 'name' ] ) ) { |
|
55 | 55 | continue; |
56 | 56 | } |
57 | 57 | $_aNameKeys = explode( '|', $_aSubElements[ 'name' ] ); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @return null|string Returns `null` if no value is found and the associated link url if found. |
47 | 47 | * Otherwise, the found value. |
48 | 48 | */ |
49 | - protected function _getPressedSubmitButtonData( array $aPostElements, $sTargetKey='field_id' ) { |
|
49 | + protected function _getPressedSubmitButtonData( array $aPostElements, $sTargetKey='field_id' ) { |
|
50 | 50 | |
51 | 51 | foreach( $aPostElements as $_sInputID => $_aSubElements ) { |
52 | 52 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | protected function _setSettingNoticeAfterValidation( $bIsInputEmtpy ) { |
86 | 86 | |
87 | - if ( $this->oFactory->hasSettingNotice() ) { |
|
87 | + if ( $this->oFactory->hasSettingNotice() ) { |
|
88 | 88 | return; |
89 | 89 | } |
90 | 90 | $this->oFactory->setSettingNotice( |
@@ -181,7 +181,8 @@ discard block |
||
181 | 181 | */ |
182 | 182 | private function _validateEachField( array $aData, array $aInputsToParse ) { |
183 | 183 | |
184 | - foreach( $aInputsToParse as $_sID => $_aSectionOrFields ) { // $_sID is either a section id or a field id |
|
184 | + foreach( $aInputsToParse as $_sID => $_aSectionOrFields ) { |
|
185 | +// $_sID is either a section id or a field id |
|
185 | 186 | |
186 | 187 | // For each section |
187 | 188 | if ( $this->oFactory->oForm->isSection( $_sID ) ) { |
@@ -192,7 +193,8 @@ discard block |
||
192 | 193 | } |
193 | 194 | |
194 | 195 | // Call the validation callback method. |
195 | - foreach( $_aSectionOrFields as $_sFieldID => $_aFields ) { // For fields |
|
196 | + foreach( $_aSectionOrFields as $_sFieldID => $_aFields ) { |
|
197 | +// For fields |
|
196 | 198 | $aData[ 'aInput' ][ $_sID ][ $_sFieldID ] = $this->_getValidatedData( |
197 | 199 | "validation_{$this->oFactory->oProp->sClassName}_{$_sID}_{$_sFieldID}", |
198 | 200 | $aData[ 'aInput' ][ $_sID ][ $_sFieldID ], |
@@ -276,7 +278,7 @@ discard block |
||
276 | 278 | */ |
277 | 279 | private function _validateTabFields( array $aData ) { |
278 | 280 | |
279 | - if ( ! $aData[ 'sTabSlug' ] || ! $aData[ 'sPageSlug' ] ) { |
|
281 | + if ( ! $aData[ 'sTabSlug' ] || ! $aData[ 'sPageSlug' ] ) { |
|
280 | 282 | return $aData; |
281 | 283 | } |
282 | 284 | |
@@ -337,7 +339,7 @@ discard block |
||
337 | 339 | */ |
338 | 340 | private function _validatePageFields( array $aData ) { |
339 | 341 | |
340 | - if ( ! $aData[ 'sPageSlug' ] ) { |
|
342 | + if ( ! $aData[ 'sPageSlug' ] ) { |
|
341 | 343 | return $aData[ 'aInput' ]; |
342 | 344 | } |
343 | 345 |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $this->oFactory |
89 | 89 | ), |
90 | 90 | 'aStoredTabDataWODynamicElements' => array(), |
91 | - 'aEmbeddedDataWODynamicElements' => array(), // stores page meta box field options. This will be updated inside the validation methods. |
|
91 | + 'aEmbeddedDataWODynamicElements' => array(), // stores page meta box field options. This will be updated inside the validation methods. |
|
92 | 92 | 'aSubmitInformation' => $aSubmitInformation, // 3.5.0+ |
93 | 93 | ); |
94 | 94 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | call_user_func_array( |
104 | 104 | array( $this->oFactory, 'validate' ), // triggers __call() |
105 | 105 | array( $_aData[ 'aInput' ], $_aData[ 'aStoredData' ], $this->oFactory, $_aData[ 'aSubmitInformation' ] ) |
106 | - ), // 3.5.3+ |
|
106 | + ), // 3.5.3+ |
|
107 | 107 | $_aData[ 'aStoredData' ], |
108 | 108 | $_aData[ 'aSubmitInformation' ] // 3.5.0+ |
109 | 109 | ); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | // If everything fine, return the filtered input data. |
117 | 117 | $this->_bHasFieldErrors = $this->oFactory->hasFieldError(); |
118 | - if ( ! $this->_bHasFieldErrors ) { |
|
118 | + if ( !$this->_bHasFieldErrors ) { |
|
119 | 119 | return $_aInput; |
120 | 120 | } |
121 | 121 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | ); |
130 | 130 | |
131 | 131 | // Go to the catch clause. |
132 | - $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clause. |
|
132 | + $_oException = new Exception( 'aReturn' ); // the property name to return from the catch clause. |
|
133 | 133 | $_oException->aReturn = $_aInput; |
134 | 134 | throw $_oException; |
135 | 135 | |
@@ -153,22 +153,22 @@ discard block |
||
153 | 153 | */ |
154 | 154 | private function _validateEachField( array $aData, array $aInputsToParse ) { |
155 | 155 | |
156 | - foreach( $aInputsToParse as $_sID => $_aSectionOrFields ) { // $_sID is either a section id or a field id |
|
156 | + foreach ( $aInputsToParse as $_sID => $_aSectionOrFields ) { // $_sID is either a section id or a field id |
|
157 | 157 | |
158 | 158 | // For each section |
159 | 159 | if ( $this->oFactory->oForm->isSection( $_sID ) ) { |
160 | 160 | |
161 | 161 | // If the parsing item does not belong to the current page, do not call the validation callback method. |
162 | - if ( ! $this->_isValidSection( $_sID, $aData[ 'sPageSlug' ], $aData[ 'sTabSlug' ] ) ) { |
|
162 | + if ( !$this->_isValidSection( $_sID, $aData[ 'sPageSlug' ], $aData[ 'sTabSlug' ] ) ) { |
|
163 | 163 | continue; |
164 | 164 | } |
165 | 165 | |
166 | 166 | // Call the validation callback method. |
167 | - foreach( $_aSectionOrFields as $_sFieldID => $_aFields ) { // For fields |
|
167 | + foreach ( $_aSectionOrFields as $_sFieldID => $_aFields ) { // For fields |
|
168 | 168 | $aData[ 'aInput' ][ $_sID ][ $_sFieldID ] = $this->_getValidatedData( |
169 | 169 | "validation_{$this->oFactory->oProp->sClassName}_{$_sID}_{$_sFieldID}", |
170 | 170 | $aData[ 'aInput' ][ $_sID ][ $_sFieldID ], |
171 | - $this->getElement( $aData, array( 'aStoredData', $_sID, $_sFieldID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ][ $_sFieldID ] ) ? $aData[ 'aStoredData' ][ $_sID ][ $_sFieldID ] : null, |
|
171 | + $this->getElement( $aData, array( 'aStoredData', $_sID, $_sFieldID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ][ $_sFieldID ] ) ? $aData[ 'aStoredData' ][ $_sID ][ $_sFieldID ] : null, |
|
172 | 172 | $aData[ 'aSubmitInformation' ] // 3.5.0+ |
173 | 173 | ); |
174 | 174 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $aData[ 'aInput' ][ $_sID ] = $this->_getValidatedData( |
190 | 190 | "validation_{$this->oFactory->oProp->sClassName}_{$_sID}", |
191 | 191 | $_aSectionInput, |
192 | - $this->getElement( $aData, array( 'aStoredData', $_sID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ] ) ? $aData[ 'aStoredData' ][ $_sID ] : null, |
|
192 | + $this->getElement( $aData, array( 'aStoredData', $_sID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ] ) ? $aData[ 'aStoredData' ][ $_sID ] : null, |
|
193 | 193 | $aData[ 'aSubmitInformation' ] |
194 | 194 | ); |
195 | 195 | |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | } |
199 | 199 | |
200 | 200 | // Check if the parsing item (the default section) belongs to the current page; if not, do not call the validation callback method. |
201 | - if ( ! $this->_isValidSection( '_default', $aData[ 'sPageSlug' ], $aData[ 'sTabSlug' ] ) ) { |
|
201 | + if ( !$this->_isValidSection( '_default', $aData[ 'sPageSlug' ], $aData[ 'sTabSlug' ] ) ) { |
|
202 | 202 | continue; |
203 | 203 | } |
204 | 204 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $aData[ 'aInput' ][ $_sID ] = $this->_getValidatedData( |
207 | 207 | "validation_{$this->oFactory->oProp->sClassName}_{$_sID}", |
208 | 208 | $aData[ 'aInput' ][ $_sID ], |
209 | - $this->getElement( $aData, array( 'aStoredData', $_sID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ] ) ? $aData[ 'aStoredData' ][ $_sID ] : null, |
|
209 | + $this->getElement( $aData, array( 'aStoredData', $_sID ), null ), // isset( $aData[ 'aStoredData' ][ $_sID ] ) ? $aData[ 'aStoredData' ][ $_sID ] : null, |
|
210 | 210 | $aData[ 'aSubmitInformation' ] |
211 | 211 | ); |
212 | 212 | |
@@ -248,22 +248,22 @@ discard block |
||
248 | 248 | */ |
249 | 249 | private function _validateTabFields( array $aData ) { |
250 | 250 | |
251 | - if ( ! $aData[ 'sTabSlug' ] || ! $aData[ 'sPageSlug' ] ) { |
|
251 | + if ( !$aData[ 'sTabSlug' ] || !$aData[ 'sPageSlug' ] ) { |
|
252 | 252 | return $aData; |
253 | 253 | } |
254 | 254 | |
255 | - $aData[ 'aStoredTabData' ] = $this->oFactory->oForm->getTabOptions( |
|
255 | + $aData[ 'aStoredTabData' ] = $this->oFactory->oForm->getTabOptions( |
|
256 | 256 | $aData[ 'aStoredData' ], |
257 | 257 | $aData[ 'sPageSlug' ], |
258 | 258 | $aData[ 'sTabSlug' ] |
259 | 259 | ); // respects page meta box fields |
260 | - $aData[ 'aStoredTabData' ] = $this->addAndApplyFilter( |
|
260 | + $aData[ 'aStoredTabData' ] = $this->addAndApplyFilter( |
|
261 | 261 | $this->oFactory, |
262 | 262 | "validation_saved_options_{$aData[ 'sPageSlug' ]}_{$aData[ 'sTabSlug' ]}", |
263 | 263 | $aData[ 'aStoredTabData' ], |
264 | 264 | $this->oFactory |
265 | 265 | ); |
266 | - $_aOtherTabOptions = $this->oFactory->oForm->getOtherTabOptions( |
|
266 | + $_aOtherTabOptions = $this->oFactory->oForm->getOtherTabOptions( |
|
267 | 267 | $aData[ 'aStoredData' ], |
268 | 268 | $aData[ 'sPageSlug' ], |
269 | 269 | $aData[ 'sTabSlug' ] |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | */ |
318 | 318 | private function _validatePageFields( array $aData ) { |
319 | 319 | |
320 | - if ( ! $aData[ 'sPageSlug' ] ) { |
|
320 | + if ( !$aData[ 'sPageSlug' ] ) { |
|
321 | 321 | return $aData[ 'aInput' ]; |
322 | 322 | } |
323 | 323 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | $_aPageOptionsWODynamicElements = $this->addAndApplyFilter( |
330 | 330 | $this->oFactory, |
331 | 331 | "validation_saved_options_without_dynamic_elements_{$aData[ 'sPageSlug' ]}", |
332 | - $this->oFactory->oForm->getPageOptions( $aData[ 'aStoredDataWODynamicElements' ], $aData[ 'sPageSlug' ] ), // united with the in-page tab specific data in order to override the page-specific dynamic elements. |
|
332 | + $this->oFactory->oForm->getPageOptions( $aData[ 'aStoredDataWODynamicElements' ], $aData[ 'sPageSlug' ] ), // united with the in-page tab specific data in order to override the page-specific dynamic elements. |
|
333 | 333 | $this->oFactory |
334 | 334 | ); |
335 | 335 | |
@@ -342,15 +342,15 @@ discard block |
||
342 | 342 | // Validate the input data. |
343 | 343 | $aData[ 'aInput' ] = $this->_getValidatedData( |
344 | 344 | "validation_{$aData[ 'sPageSlug' ]}", |
345 | - $aData[ 'aInput' ], // new values |
|
346 | - $_aPageOptions, // stored page options |
|
345 | + $aData[ 'aInput' ], // new values |
|
346 | + $_aPageOptions, // stored page options |
|
347 | 347 | $aData[ 'aSubmitInformation' ] // submit information 3.5.0+ |
348 | 348 | ); |
349 | 349 | |
350 | 350 | // If it's in a tab-page, drop the elements which belong to the tab so that arrayed-options will not be merged such as multiple select options. |
351 | - $_aPageOptions = $aData[ 'sTabSlug' ] && ! empty( $aData[ 'aStoredTabData' ] ) |
|
351 | + $_aPageOptions = $aData[ 'sTabSlug' ] && !empty( $aData[ 'aStoredTabData' ] ) |
|
352 | 352 | ? $this->invertCastArrayContents( $_aPageOptions, $aData[ 'aStoredTabData' ] ) |
353 | - : ( ! $aData[ 'sTabSlug' ] // if the tab is not specified, do not merge the input array with the page options as the input array already includes the page options. This is for dynamic elements(repeatable sections). |
|
353 | + : ( !$aData[ 'sTabSlug' ] // if the tab is not specified, do not merge the input array with the page options as the input array already includes the page options. This is for dynamic elements(repeatable sections). |
|
354 | 354 | ? array() |
355 | 355 | : $_aPageOptions |
356 | 356 | ); |
@@ -405,13 +405,13 @@ discard block |
||
405 | 405 | * @param array $aStoredData The stored option. |
406 | 406 | * @param array $aSubmitInfo [3.5.0+] The form submit information such as the field ID of the pressed submit field. |
407 | 407 | */ |
408 | - private function _getValidatedData( $sFilterName, $aInputs, $aStoredData, $aSubmitInfo=array() ) { |
|
408 | + private function _getValidatedData( $sFilterName, $aInputs, $aStoredData, $aSubmitInfo = array() ) { |
|
409 | 409 | return $this->addAndApplyFilter( |
410 | - $this->oFactory, // caller |
|
411 | - $sFilterName, // hook name |
|
412 | - $aInputs, // 1st argument |
|
413 | - $aStoredData, // 2nd argument |
|
414 | - $this->oFactory, // 3rd argument |
|
410 | + $this->oFactory, // caller |
|
411 | + $sFilterName, // hook name |
|
412 | + $aInputs, // 1st argument |
|
413 | + $aStoredData, // 2nd argument |
|
414 | + $this->oFactory, // 3rd argument |
|
415 | 415 | $aSubmitInfo // 4th argument 3.5.0+ |
416 | 416 | ); |
417 | 417 | } |
@@ -53,14 +53,14 @@ |
||
53 | 53 | |
54 | 54 | // Apply filters to modify the in-page tab array. |
55 | 55 | $_aInPageTabs = $this->addAndApplyFilter( |
56 | - $this->oFactory, // caller object |
|
56 | + $this->oFactory, // caller object |
|
57 | 57 | "tabs_{$this->oFactory->oProp->sClassName}_{$this->sPageSlug}", // filter name |
58 | 58 | $this->aInPageTabs // filtering value |
59 | 59 | ); |
60 | 60 | |
61 | 61 | // Added items may be missing necessary keys so format them |
62 | - foreach( ( array ) $_aInPageTabs as $_sTabSlug => $_aInPageTab ) { |
|
63 | - if ( ! is_array( $_aInPageTab ) ) { |
|
62 | + foreach ( ( array ) $_aInPageTabs as $_sTabSlug => $_aInPageTab ) { |
|
63 | + if ( !is_array( $_aInPageTab ) ) { |
|
64 | 64 | continue; |
65 | 65 | } |
66 | 66 | $_oFormatter = new AdminPageFramework_Format_InPageTab( |
@@ -29,7 +29,7 @@ |
||
29 | 29 | public function render( $sContext ) { |
30 | 30 | |
31 | 31 | // If nothing is registered do not render even the container. |
32 | - if ( ! $this->doesMetaBoxExist() ) { |
|
32 | + if ( !$this->doesMetaBoxExist() ) { |
|
33 | 33 | return; |
34 | 34 | } |
35 | 35 |
@@ -55,7 +55,7 @@ |
||
55 | 55 | * @param string $sTextDomain (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: `admin-page-framework`. |
56 | 56 | * @return void returns nothing. |
57 | 57 | */ |
58 | - public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ){ |
|
58 | + public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ) { |
|
59 | 59 | |
60 | 60 | if ( ! $this->_isInstantiatable() ) { |
61 | 61 | return; |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | protected $_aBuiltInRootMenuSlugs = array( |
40 | 40 | // All keys must be lower case to support case insensitive look-ups. |
41 | 41 | 'dashboard' => 'index.php', |
42 | - 'sites' => 'sites.php', // not work |
|
43 | - 'themes' => 'themes.php', // not work |
|
42 | + 'sites' => 'sites.php', // not work |
|
43 | + 'themes' => 'themes.php', // not work |
|
44 | 44 | 'plugins' => 'plugins.php', |
45 | 45 | 'users' => 'users.php', |
46 | 46 | 'settings' => 'settings.php', |
47 | - 'updates' => 'update-core.php', // does not work |
|
47 | + 'updates' => 'update-core.php', // does not work |
|
48 | 48 | ); |
49 | 49 | |
50 | 50 | /** |
@@ -65,15 +65,15 @@ discard block |
||
65 | 65 | * @param string $sTextDomain (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: `admin-page-framework`. |
66 | 66 | * @return void returns nothing. |
67 | 67 | */ |
68 | - public function __construct( $sOptionKey=null, $sCallerPath=null, $sCapability='manage_network', $sTextDomain='admin-page-framework' ){ |
|
68 | + public function __construct( $sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_network', $sTextDomain = 'admin-page-framework' ) { |
|
69 | 69 | |
70 | - if ( ! $this->_isInstantiatable() ) { |
|
70 | + if ( !$this->_isInstantiatable() ) { |
|
71 | 71 | return; |
72 | 72 | } |
73 | 73 | |
74 | 74 | $sCallerPath = $sCallerPath |
75 | 75 | ? $sCallerPath |
76 | - : AdminPageFramework_Utility::getCallerScriptPath( __FILE__ ); // this is important to attempt to find the caller script path here when separating the library into multiple files. |
|
76 | + : AdminPageFramework_Utility::getCallerScriptPath( __FILE__ ); // this is important to attempt to find the caller script path here when separating the library into multiple files. |
|
77 | 77 | |
78 | 78 | parent::__construct( $sOptionKey, $sCallerPath, $sCapability, $sTextDomain ); |
79 | 79 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @param mixed $vDefault the default value that will be returned if nothing is stored. |
158 | 158 | * @return mixed If the field ID is not specified. |
159 | 159 | */ |
160 | - static public function getOption( $sOptionKey, $asKey=null , $vDefault=null ) { |
|
160 | + static public function getOption( $sOptionKey, $asKey = null, $vDefault = null ) { |
|
161 | 161 | return AdminPageFramework_WPUtility::getSiteOption( $sOptionKey, $asKey, $vDefault ); |
162 | 162 | } |
163 | 163 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | trigger_error( |
44 | - 'Admin Page Framework - Loader: ' . ' : ' . sprintf( |
|
44 | + 'Admin Page Framework - Loader: '.' : '.sprintf( |
|
45 | 45 | __( 'The method is not defined: %1$s', 'admin-page-framework-loader' ), |
46 | 46 | $sMethodName |
47 | 47 | ), |
@@ -24,12 +24,12 @@ |
||
24 | 24 | */ |
25 | 25 | public function content( $sContent ) { |
26 | 26 | |
27 | - $_aReplacements = array( |
|
27 | + $_aReplacements = array( |
|
28 | 28 | '%PLUGIN_DIR_URL%' => AdminPageFrameworkLoader_Registry::getPluginURL(), |
29 | 29 | '%WP_ADMIN_URL%' => admin_url(), |
30 | 30 | ); |
31 | 31 | $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( |
32 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt', |
|
32 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/about.txt', |
|
33 | 33 | $_aReplacements |
34 | 34 | ); |
35 | 35 | return '' |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | public function replyToDoTab( $oFactory ) { |
36 | 36 | |
37 | - echo "<h3>" . __( 'Saved Options', 'admin-page-framework-loader' ) . "</h3>"; |
|
37 | + echo "<h3>".__( 'Saved Options', 'admin-page-framework-loader' )."</h3>"; |
|
38 | 38 | $oFactory->oDebug->dump( $oFactory->oProp->aOptions ); |
39 | 39 | |
40 | 40 | } |