@@ -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 |
@@ -43,14 +43,14 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function _replyToDetermineToLoadAdmin( /* $oScreen */ ) { |
45 | 45 | |
46 | - if ( ! $this->_isInThePage() ) { |
|
46 | + if ( !$this->_isInThePage() ) { |
|
47 | 47 | return; |
48 | 48 | } |
49 | 49 | |
50 | 50 | $this->_load( |
51 | 51 | array( |
52 | 52 | "load_{$this->oProp->sPostType}", |
53 | - "load_{$this->oProp->sClassName}", // 3.8.14+ |
|
53 | + "load_{$this->oProp->sClassName}", // 3.8.14+ |
|
54 | 54 | ) |
55 | 55 | ); |
56 | 56 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | protected function _isInThePage() { |
109 | 109 | |
110 | 110 | // If it's not in one of the post type's pages |
111 | - if ( ! $this->oProp->bIsAdmin ) { |
|
111 | + if ( !$this->oProp->bIsAdmin ) { |
|
112 | 112 | return false; |
113 | 113 | } |
114 | 114 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | return true; |
118 | 118 | } |
119 | 119 | |
120 | - if ( ! in_array( $this->oProp->sPageNow, array( 'edit.php', 'edit-tags.php', 'term.php', 'post.php', 'post-new.php' ) ) ) { |
|
120 | + if ( !in_array( $this->oProp->sPageNow, array( 'edit.php', 'edit-tags.php', 'term.php', 'post.php', 'post-new.php' ) ) ) { |
|
121 | 121 | return false; |
122 | 122 | } |
123 | 123 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @package AdminPageFramework/Factory/PostType |
16 | 16 | * @internal |
17 | 17 | */ |
18 | -abstract class AdminPageFramework_PostType_Router extends AdminPageFramework_Factory { |
|
18 | +abstract class AdminPageFramework_PostType_Router extends AdminPageFramework_Factory { |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Sets up hooks and properties. |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | parent::__construct( $oProp ); |
28 | 28 | |
29 | - if ( ! $this->oProp->bIsAdmin ) { |
|
29 | + if ( !$this->oProp->bIsAdmin ) { |
|
30 | 30 | return; |
31 | 31 | } |
32 | 32 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | ); |
39 | 39 | |
40 | 40 | // 3.7.10+ |
41 | - add_action( 'set_up_' . $this->oProp->sClassName, array( $this, '_replyToSetUpHooks' ) ); |
|
41 | + add_action( 'set_up_'.$this->oProp->sClassName, array( $this, '_replyToSetUpHooks' ) ); |
|
42 | 42 | |
43 | 43 | } |
44 | 44 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | return true; |
58 | 58 | } |
59 | 59 | |
60 | - if ( ! $this->oProp->bIsAdmin ) { |
|
60 | + if ( !$this->oProp->bIsAdmin ) { |
|
61 | 61 | return false; |
62 | 62 | } |
63 | 63 | |
@@ -78,14 +78,14 @@ discard block |
||
78 | 78 | public function _replyToSetUpHooks( $oFactory ) { |
79 | 79 | |
80 | 80 | // Hooks to display fields. |
81 | - add_action( 'show_user_profile', array( $this, '_replyToPrintFields' ) ); // profile.php |
|
82 | - add_action( 'edit_user_profile', array( $this, '_replyToPrintFields' ) ); // profile.php |
|
83 | - add_action( 'user_new_form', array( $this, '_replyToPrintFields' ) ); // user-new.php |
|
81 | + add_action( 'show_user_profile', array( $this, '_replyToPrintFields' ) ); // profile.php |
|
82 | + add_action( 'edit_user_profile', array( $this, '_replyToPrintFields' ) ); // profile.php |
|
83 | + add_action( 'user_new_form', array( $this, '_replyToPrintFields' ) ); // user-new.php |
|
84 | 84 | |
85 | 85 | // Hooks to save field values. |
86 | - add_action( 'personal_options_update', array( $this, '_replyToSaveFieldValues' ) ); // profile.php |
|
87 | - add_action( 'edit_user_profile_update', array( $this, '_replyToSaveFieldValues' ) ); // profile.php |
|
88 | - add_action('user_register', array( $this, '_replyToSaveFieldValues' ) ); // user-new.php |
|
86 | + add_action( 'personal_options_update', array( $this, '_replyToSaveFieldValues' ) ); // profile.php |
|
87 | + add_action( 'edit_user_profile_update', array( $this, '_replyToSaveFieldValues' ) ); // profile.php |
|
88 | + add_action( 'user_register', array( $this, '_replyToSaveFieldValues' ) ); // user-new.php |
|
89 | 89 | |
90 | 90 | $this->_load(); // 3.8.14+ |
91 | 91 |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * @since 3.7.0 |
21 | 21 | * @return string |
22 | 22 | */ |
23 | - protected function _get() { |
|
23 | + protected function _get() { |
|
24 | 24 | return $this->_getRules(); |
25 | 25 | } |
26 | 26 | /** |