@@ -37,7 +37,7 @@ |
||
| 37 | 37 | '', |
| 38 | 38 | "|{$this->sIndex}" |
| 39 | 39 | ); |
| 40 | - return $this->_getFiltered( $this->_getFlatFieldName() . $_sIndex ); |
|
| 40 | + return $this->_getFiltered( $this->_getFlatFieldName().$_sIndex ); |
|
| 41 | 41 | |
| 42 | 42 | } |
| 43 | 43 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * @return string |
| 40 | 40 | */ |
| 41 | 41 | public function getModel() { |
| 42 | - return $this->get() . '__' . $this->sIndexMark; |
|
| 42 | + return $this->get().'__'.$this->sIndexMark; |
|
| 43 | 43 | } |
| 44 | 44 | /** |
| 45 | 45 | * @since 3.6.0 |
@@ -49,17 +49,17 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | // 3.8.0+ |
| 51 | 51 | if ( $this->aArguments[ '_parent_tag_id' ] ) { |
| 52 | - return $this->aArguments[ '_parent_tag_id' ] . '_' . $this->aArguments[ 'field_id' ]; |
|
| 52 | + return $this->aArguments[ '_parent_tag_id' ].'_'.$this->aArguments[ 'field_id' ]; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | $_sSectionIndex = isset( $this->aArguments[ '_section_index' ] ) |
| 56 | - ? '__' . $this->aArguments[ '_section_index' ] |
|
| 56 | + ? '__'.$this->aArguments[ '_section_index' ] |
|
| 57 | 57 | : ''; |
| 58 | 58 | $_sSectionPart = implode( '_', $this->aArguments[ '_section_path_array' ] ); |
| 59 | 59 | $_sFieldPart = implode( '_', $this->aArguments[ '_field_path_array' ] ); |
| 60 | 60 | |
| 61 | 61 | return $this->_isSectionSet() |
| 62 | - ? $_sSectionPart . $_sSectionIndex . '_' . $_sFieldPart |
|
| 62 | + ? $_sSectionPart.$_sSectionIndex.'_'.$_sFieldPart |
|
| 63 | 63 | : $_sFieldPart; |
| 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 | |
@@ -25,9 +25,9 @@ discard block |
||
| 25 | 25 | /** |
| 26 | 26 | * Sets up hooks and properties. |
| 27 | 27 | */ |
| 28 | - public function __construct( $oProp, $oMsg=null ) { |
|
| 28 | + public function __construct( $oProp, $oMsg = null ) { |
|
| 29 | 29 | |
| 30 | - if ( ! $this->_isLoadable( $oProp ) ) { |
|
| 30 | + if ( !$this->_isLoadable( $oProp ) ) { |
|
| 31 | 31 | return; |
| 32 | 32 | } |
| 33 | 33 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | // Add an action link in the plugin listing page |
| 40 | 40 | if ( $this->_shouldSetPluginActionLinks() ) { |
| 41 | 41 | add_filter( |
| 42 | - 'plugin_action_links_' . plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ), |
|
| 42 | + 'plugin_action_links_'.plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ), |
|
| 43 | 43 | array( $this, '_replyToAddSettingsLinkInPluginListingPage' ), |
| 44 | 44 | 20 // set a lower priority so that the link will be embedded at the beginning ( the most left hand side ). |
| 45 | 45 | ); |
@@ -54,13 +54,13 @@ discard block |
||
| 54 | 54 | * @return boolean |
| 55 | 55 | */ |
| 56 | 56 | private function _isLoadable( $oProp ) { |
| 57 | - if ( ! $oProp->bIsAdmin ) { |
|
| 57 | + if ( !$oProp->bIsAdmin ) { |
|
| 58 | 58 | return false; |
| 59 | 59 | } |
| 60 | 60 | if ( $oProp->bIsAdminAjax ) { |
| 61 | 61 | return false; |
| 62 | 62 | } |
| 63 | - return ! $this->hasBeenCalled( 'links_' . $oProp->sClassName ); |
|
| 63 | + return !$this->hasBeenCalled( 'links_'.$oProp->sClassName ); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -84,11 +84,11 @@ discard block |
||
| 84 | 84 | protected function _shouldSetPluginActionLinks() { |
| 85 | 85 | |
| 86 | 86 | // It is possible that the sub-objects are not set when the class is considered not loadable. |
| 87 | - if ( ! isset( $this->oProp ) ) { |
|
| 87 | + if ( !isset( $this->oProp ) ) { |
|
| 88 | 88 | return false; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - if ( ! in_array( $this->oProp->sPageNow, array( 'plugins.php' ) ) ) { |
|
| 91 | + if ( !in_array( $this->oProp->sPageNow, array( 'plugins.php' ) ) ) { |
|
| 92 | 92 | return false; |
| 93 | 93 | } |
| 94 | 94 | return 'plugin' === $this->oProp->aScriptInfo[ 'sType' ]; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | array( |
| 156 | 156 | 'href' => $aScriptInfo[ 'sURI' ], |
| 157 | 157 | 'target' => '_blank', |
| 158 | - 'title' => $aScriptInfo[ 'sName' ] . $_sVersion . $_sDescription |
|
| 158 | + 'title' => $aScriptInfo[ 'sName' ].$_sVersion.$_sDescription |
|
| 159 | 159 | ), |
| 160 | 160 | $aScriptInfo[ 'sName' ] |
| 161 | 161 | ) |
@@ -177,13 +177,13 @@ discard block |
||
| 177 | 177 | $_sAuthorInfo = $this->getAOrB( |
| 178 | 178 | empty( $aScriptInfo[ 'sAuthor' ] ), |
| 179 | 179 | $_sAuthorInfo, |
| 180 | - ' by ' . $_sAuthorInfo |
|
| 180 | + ' by '.$_sAuthorInfo |
|
| 181 | 181 | ); |
| 182 | 182 | |
| 183 | 183 | // Enclosing the output in a span tag as the outer element is a '<p>' tag. So this cannot be div. |
| 184 | 184 | // 3.5.7+ Added the class attribute for acceptance testing |
| 185 | 185 | return "<span class='apf-script-info'>" |
| 186 | - . $_sPluginInfo . $_sAuthorInfo |
|
| 186 | + . $_sPluginInfo.$_sAuthorInfo |
|
| 187 | 187 | . "</span>"; |
| 188 | 188 | |
| 189 | 189 | } |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | array( |
| 215 | 215 | 'href' => $aScriptInfo[ 'sURI' ], |
| 216 | 216 | 'target' => '_blank', |
| 217 | - 'title' => $aScriptInfo[ 'sName' ] . $_sVersion . $_sDescription, |
|
| 217 | + 'title' => $aScriptInfo[ 'sName' ].$_sVersion.$_sDescription, |
|
| 218 | 218 | ), |
| 219 | 219 | $aScriptInfo[ 'sName' ] |
| 220 | 220 | ) |
@@ -224,16 +224,16 @@ discard block |
||
| 224 | 224 | // 3.5.7+ added the 'apf-credit' class attribute for acceptance testing |
| 225 | 225 | // 3.7.0+ added the footer-thankyou id attribute. |
| 226 | 226 | return "<span class='apf-credit' id='footer-thankyou'>" |
| 227 | - . $this->oMsg->get( 'powered_by' ) . ' ' |
|
| 227 | + . $this->oMsg->get( 'powered_by' ).' ' |
|
| 228 | 228 | . $_sLibraryInfo |
| 229 | 229 | . ", " |
| 230 | - . $this->oMsg->get( 'and' ) . ' ' |
|
| 230 | + . $this->oMsg->get( 'and' ).' ' |
|
| 231 | 231 | . $this->getHTMLTag( |
| 232 | 232 | 'a', |
| 233 | 233 | array( |
| 234 | 234 | 'href' => 'https://wordpress.org', |
| 235 | 235 | 'target' => '_blank', |
| 236 | - 'title' => 'WordPress ' . $GLOBALS[ 'wp_version' ] |
|
| 236 | + 'title' => 'WordPress '.$GLOBALS[ 'wp_version' ] |
|
| 237 | 237 | ), |
| 238 | 238 | 'WordPress' |
| 239 | 239 | ) |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | */ |
| 250 | 250 | protected function _setFooterHooks() { |
| 251 | 251 | |
| 252 | - add_filter( 'admin_footer_text' , array( $this, '_replyToAddInfoInFooterLeft' ) ); |
|
| 252 | + add_filter( 'admin_footer_text', array( $this, '_replyToAddInfoInFooterLeft' ) ); |
|
| 253 | 253 | add_filter( 'update_footer', array( $this, '_replyToAddInfoInFooterRight' ), 11 ); |
| 254 | 254 | |
| 255 | 255 | } |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | * @callback filter admin_footer_text |
| 262 | 262 | * @internal |
| 263 | 263 | */ |
| 264 | - public function _replyToAddInfoInFooterLeft( $sLinkHTML='' ) { |
|
| 264 | + public function _replyToAddInfoInFooterLeft( $sLinkHTML = '' ) { |
|
| 265 | 265 | |
| 266 | 266 | $sLinkHTML = empty( $this->oProp->aScriptInfo[ 'sName' ] ) |
| 267 | 267 | ? $sLinkHTML |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | |
| 270 | 270 | return $this->addAndApplyFilters( |
| 271 | 271 | $this->oProp->oCaller, |
| 272 | - 'footer_left_' . $this->oProp->sClassName, |
|
| 272 | + 'footer_left_'.$this->oProp->sClassName, |
|
| 273 | 273 | $sLinkHTML |
| 274 | 274 | ); |
| 275 | 275 | |
@@ -282,10 +282,10 @@ discard block |
||
| 282 | 282 | * @callback filter admin_footer_text |
| 283 | 283 | * @internal |
| 284 | 284 | */ |
| 285 | - public function _replyToAddInfoInFooterRight( $sLinkHTML='' ) { |
|
| 285 | + public function _replyToAddInfoInFooterRight( $sLinkHTML = '' ) { |
|
| 286 | 286 | return $this->addAndApplyFilters( |
| 287 | 287 | $this->oProp->oCaller, |
| 288 | - 'footer_right_' . $this->oProp->sClassName, |
|
| 288 | + 'footer_right_'.$this->oProp->sClassName, |
|
| 289 | 289 | $this->oProp->aFooterInfo[ 'sRight' ] |
| 290 | 290 | ); |
| 291 | 291 | } |
@@ -162,8 +162,8 @@ discard block |
||
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | // Call the user constructor. |
| 165 | - $this->start(); // defined in the controller class. |
|
| 166 | - $this->oUtil->addAndDoAction( $this, 'start_' . $this->oProp->sClassName, $this ); |
|
| 165 | + $this->start(); // defined in the controller class. |
|
| 166 | + $this->oUtil->addAndDoAction( $this, 'start_'.$this->oProp->sClassName, $this ); |
|
| 167 | 167 | |
| 168 | 168 | } |
| 169 | 169 | /** |
@@ -172,8 +172,8 @@ discard block |
||
| 172 | 172 | * @return array |
| 173 | 173 | */ |
| 174 | 174 | private function ___getSubClassNames() { |
| 175 | - foreach( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) { |
|
| 176 | - $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix . $this->_sStructureType; |
|
| 175 | + foreach ( $this->_aSubClassPrefixes as $_sObjectVariableName => $_sPrefix ) { |
|
| 176 | + $this->aSubClassNames[ $_sObjectVariableName ] = $_sPrefix.$this->_sStructureType; |
|
| 177 | 177 | } |
| 178 | 178 | return $this->aSubClassNames + $this->_aSubClassNames; |
| 179 | 179 | } |
@@ -187,15 +187,15 @@ discard block |
||
| 187 | 187 | */ |
| 188 | 188 | public function _replyToLoadComponents( /* $oScreen */ ) { |
| 189 | 189 | |
| 190 | - if ( ! $this->_isInThePage() ) { |
|
| 190 | + if ( !$this->_isInThePage() ) { |
|
| 191 | 191 | return; |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - if ( ! isset( $this->oResource ) ) { |
|
| 194 | + if ( !isset( $this->oResource ) ) { |
|
| 195 | 195 | $this->oResource = $this->_replyTpSetAndGetInstance_oResource(); |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | - if ( ! isset( $this->oLink ) ) { |
|
| 198 | + if ( !isset( $this->oLink ) ) { |
|
| 199 | 199 | $this->oLink = $this->_replyTpSetAndGetInstance_oLink(); |
| 200 | 200 | } |
| 201 | 201 | |
@@ -209,10 +209,10 @@ discard block |
||
| 209 | 209 | * Calls the load method and callbacks. |
| 210 | 210 | * @since 3.8.14 |
| 211 | 211 | */ |
| 212 | - protected function _load( $aActions=array() ) { |
|
| 212 | + protected function _load( $aActions = array() ) { |
|
| 213 | 213 | $aActions = empty( $aActions ) |
| 214 | 214 | ? array( |
| 215 | - 'load_' . $this->oProp->sClassName, |
|
| 215 | + 'load_'.$this->oProp->sClassName, |
|
| 216 | 216 | ) |
| 217 | 217 | : $aActions; |
| 218 | 218 | $this->load(); |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | */ |
| 225 | 225 | protected function _setUp() { |
| 226 | 226 | $aActions = array( |
| 227 | - 'set_up_' . $this->oProp->sClassName, |
|
| 227 | + 'set_up_'.$this->oProp->sClassName, |
|
| 228 | 228 | ); |
| 229 | 229 | $this->setUp(); |
| 230 | 230 | $this->oUtil->addAndDoActions( $this, $aActions, $this ); |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | * @since 3.8.19 |
| 252 | 252 | */ |
| 253 | 253 | protected function _isWordPressCoreAjaxRequest() { |
| 254 | - if ( ! isset( $GLOBALS[ 'pagenow' ] ) ) { |
|
| 254 | + if ( !isset( $GLOBALS[ 'pagenow' ] ) ) { |
|
| 255 | 255 | return false; |
| 256 | 256 | } |
| 257 | 257 | if ( 'admin-ajax.php' !== $GLOBALS[ 'pagenow' ] ) { |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | * @return boolean |
| 284 | 284 | */ |
| 285 | 285 | protected function _isValidAjaxReferrer() { |
| 286 | - if ( ! $this->oProp->bIsAdminAjax ) { |
|
| 286 | + if ( !$this->oProp->bIsAdminAjax ) { |
|
| 287 | 287 | return false; |
| 288 | 288 | } |
| 289 | 289 | return true; |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | */ |
| 300 | 300 | public function _replyToDetermineToLoad() { |
| 301 | 301 | |
| 302 | - if ( ! $this->_isInThePage() ) { |
|
| 302 | + if ( !$this->_isInThePage() ) { |
|
| 303 | 303 | return; |
| 304 | 304 | } |
| 305 | 305 | |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | // Set and return the sub class object instance. |
| 364 | 364 | if ( isset( $this->aSubClassNames[ $sPropertyName ] ) ) { |
| 365 | 365 | return call_user_func( |
| 366 | - array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
| 366 | + array( $this, "_replyTpSetAndGetInstance_{$sPropertyName}" ) |
|
| 367 | 367 | ); |
| 368 | 368 | } |
| 369 | 369 | |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | */ |
| 398 | 398 | public function _replyTpSetAndGetInstance_oMsg() { |
| 399 | 399 | $this->oMsg = call_user_func_array( |
| 400 | - array( $this->aSubClassNames[ 'oMsg' ], 'getInstance'), |
|
| 400 | + array( $this->aSubClassNames[ 'oMsg' ], 'getInstance' ), |
|
| 401 | 401 | array( $this->oProp->sTextDomain ) // parameters |
| 402 | 402 | ); |
| 403 | 403 | return $this->oMsg; |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | * |
| 463 | 463 | * @internal |
| 464 | 464 | */ |
| 465 | - public function __call( $sMethodName, $aArguments=null ) { |
|
| 465 | + public function __call( $sMethodName, $aArguments = null ) { |
|
| 466 | 466 | |
| 467 | 467 | $_mFirstArg = $this->oUtil->getElement( $aArguments, 0 ); |
| 468 | 468 | |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | |
| 493 | 493 | // Check if the method name does not contain a backslash. |
| 494 | 494 | if ( false === strpos( $sMethodName, "\\" ) ) { |
| 495 | - return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
| 495 | + return $this->oUtil->getElement( $aArguments, 0 ); // the first element - the filter value |
|
| 496 | 496 | } |
| 497 | 497 | |
| 498 | 498 | // If the method name contains a backslash, the user may be using a name space. |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | array( $this, $_sAutoCallbackMethodName ), |
| 504 | 504 | $aArguments |
| 505 | 505 | ) |
| 506 | - : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
| 506 | + : $this->oUtil->getElement( $aArguments, 0 ); // the first argument |
|
| 507 | 507 | |
| 508 | 508 | } |
| 509 | 509 | |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | */ |
| 514 | 514 | private function _triggerUndefinedMethodWarning( $sMethodName ) { |
| 515 | 515 | trigger_error( |
| 516 | - AdminPageFramework_Registry::NAME . ': ' |
|
| 516 | + AdminPageFramework_Registry::NAME.': ' |
|
| 517 | 517 | . sprintf( |
| 518 | 518 | __( 'The method is not defined: %1$s', $this->oProp->sTextDomain ), |
| 519 | 519 | $sMethodName |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * @return string the input id attribute |
| 41 | 41 | */ |
| 42 | 42 | public function _replyToGetSectionName( /* $sSectionName, $aSectionset */ ) { |
| 43 | - $_aParams = func_get_args() + array( null, null, ); |
|
| 43 | + $_aParams = func_get_args() + array( null, null,); |
|
| 44 | 44 | return $_aParams[ 0 ]; |
| 45 | 45 | } |
| 46 | 46 | |
@@ -68,8 +68,8 @@ discard block |
||
| 68 | 68 | * @since 3.6.0 |
| 69 | 69 | * @return string |
| 70 | 70 | */ |
| 71 | - public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) { |
|
| 72 | - $_aParams = func_get_args() + array( null, null, ); |
|
| 71 | + public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) { |
|
| 72 | + $_aParams = func_get_args() + array( null, null,); |
|
| 73 | 73 | return $_aParams[ 0 ]; |
| 74 | 74 | } |
| 75 | 75 | /** |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | * @return string |
| 80 | 80 | */ |
| 81 | 81 | public function _replyToGetFlatFieldName( /* $sFieldName, $aFieldset */ ) { |
| 82 | - $_aParams = func_get_args() + array( null, null, ); |
|
| 82 | + $_aParams = func_get_args() + array( null, null,); |
|
| 83 | 83 | return $_aParams[ 0 ]; |
| 84 | 84 | } |
| 85 | 85 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | * @return string the flat input name attribute |
| 102 | 102 | */ |
| 103 | 103 | public function _replyToGetFlatInputName( /* $sFlatNameAttribute, $aField, $sKey */ ) { |
| 104 | - $_aParams = func_get_args() + array( null, null, null ); |
|
| 104 | + $_aParams = func_get_args() + array( null, null, null ); |
|
| 105 | 105 | return $_aParams[ 0 ]; |
| 106 | 106 | } |
| 107 | 107 | |
@@ -143,14 +143,14 @@ discard block |
||
| 143 | 143 | 'if' => true, |
| 144 | 144 | 'capability' => '', |
| 145 | 145 | ); |
| 146 | - if ( ! $aElementDefinition[ 'if' ] ) { |
|
| 146 | + if ( !$aElementDefinition[ 'if' ] ) { |
|
| 147 | 147 | return false; |
| 148 | 148 | } |
| 149 | 149 | // For front-end forms that allow guests, the capability level can be empty. In that case, return true. |
| 150 | - if ( ! $aElementDefinition[ 'capability' ] ) { |
|
| 150 | + if ( !$aElementDefinition[ 'capability' ] ) { |
|
| 151 | 151 | return true; |
| 152 | 152 | } |
| 153 | - if ( ! current_user_can( $aElementDefinition[ 'capability' ] ) ) { |
|
| 153 | + if ( !current_user_can( $aElementDefinition[ 'capability' ] ) ) { |
|
| 154 | 154 | return false; |
| 155 | 155 | } |
| 156 | 156 | return $bDefault; |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $this, |
| 187 | 187 | array( |
| 188 | 188 | // section_{instantiated class name}_{section id} |
| 189 | - 'section_head_' . $this->oProp->sClassName . '_' . $aSectionset[ 'section_id' ] |
|
| 189 | + 'section_head_'.$this->oProp->sClassName.'_'.$aSectionset[ 'section_id' ] |
|
| 190 | 190 | ), |
| 191 | 191 | $sSectionDescription |
| 192 | 192 | ); |
@@ -203,15 +203,15 @@ discard block |
||
| 203 | 203 | */ |
| 204 | 204 | public function _replyToGetFieldOutput( $sFieldOutput, $aFieldset ) { |
| 205 | 205 | |
| 206 | - $_sSectionPart = $this->oUtil->getAOrB( |
|
| 206 | + $_sSectionPart = $this->oUtil->getAOrB( |
|
| 207 | 207 | isset( $aFieldset[ 'section_id' ] ) && '_default' !== $aFieldset[ 'section_id' ], |
| 208 | - '_' . $aFieldset[ 'section_id' ], |
|
| 208 | + '_'.$aFieldset[ 'section_id' ], |
|
| 209 | 209 | '' |
| 210 | 210 | ); |
| 211 | 211 | return $this->oUtil->addAndApplyFilters( |
| 212 | 212 | $this, |
| 213 | 213 | array( |
| 214 | - 'field_' . $this->oProp->sClassName . $_sSectionPart . '_' . $aFieldset[ 'field_id' ] |
|
| 214 | + 'field_'.$this->oProp->sClassName.$_sSectionPart.'_'.$aFieldset[ 'field_id' ] |
|
| 215 | 215 | ), |
| 216 | 216 | $sFieldOutput, |
| 217 | 217 | $aFieldset // the field array |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | * @since 3.6.0 |
| 69 | 69 | * @return string |
| 70 | 70 | */ |
| 71 | - public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) { |
|
| 71 | + public function _replyToGetFieldNameAttribute( /* $sFieldName, $aFieldset */ ) { |
|
| 72 | 72 | $_aParams = func_get_args() + array( null, null, ); |
| 73 | 73 | return $_aParams[ 0 ]; |
| 74 | 74 | } |
@@ -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 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | /** |
| 26 | 26 | * Stores the tab items. |
| 27 | 27 | */ |
| 28 | - public $aTabs = array(); |
|
| 28 | + public $aTabs = array(); |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Stores container attributes. |
@@ -35,11 +35,11 @@ discard block |
||
| 35 | 35 | ); |
| 36 | 36 | |
| 37 | 37 | public $aTab = array( |
| 38 | - 'slug' => null, // (string) tab slug (id) |
|
| 39 | - 'title' => null, // (string) tab title |
|
| 40 | - 'href' => null, // (string) link url |
|
| 41 | - 'disabled' => null, // (boolean) |
|
| 42 | - 'class' => null, // (string) class selector to append to the class attribute |
|
| 38 | + 'slug' => null, // (string) tab slug (id) |
|
| 39 | + 'title' => null, // (string) tab title |
|
| 40 | + 'href' => null, // (string) link url |
|
| 41 | + 'disabled' => null, // (boolean) |
|
| 42 | + 'class' => null, // (string) class selector to append to the class attribute |
|
| 43 | 43 | 'attributes' => array(), |
| 44 | 44 | ); |
| 45 | 45 | |
@@ -58,11 +58,11 @@ discard block |
||
| 58 | 58 | * @param array $aTabs An array holding each tab definitions |
| 59 | 59 | * @param array|string $asActiveTabSlugs The default tab slug. |
| 60 | 60 | */ |
| 61 | - public function __construct( array $aTabs, $asActiveTabSlugs, $sTabTag='h2', $aAttributes=array( 'class' => 'nav-tab-wrapper', ), $aCallbacks=array() ) { |
|
| 61 | + public function __construct( array $aTabs, $asActiveTabSlugs, $sTabTag = 'h2', $aAttributes = array( 'class' => 'nav-tab-wrapper',), $aCallbacks = array() ) { |
|
| 62 | 62 | |
| 63 | - $this->aCallbacks = $aCallbacks + array( |
|
| 63 | + $this->aCallbacks = $aCallbacks + array( |
|
| 64 | 64 | 'format' => null, |
| 65 | - 'arguments' => null, // custom arguments to pass to the callback functions. |
|
| 65 | + 'arguments' => null, // custom arguments to pass to the callback functions. |
|
| 66 | 66 | ); |
| 67 | 67 | $this->aTabs = $this->_getFormattedTabs( $aTabs ); |
| 68 | 68 | $this->aActiveSlugs = $this->getAsArray( $asActiveTabSlugs ); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @return array |
| 77 | 77 | */ |
| 78 | 78 | private function _getFormattedTabs( array $aTabs ) { |
| 79 | - foreach( $aTabs as $_isKey => &$_aTab ) { |
|
| 79 | + foreach ( $aTabs as $_isKey => &$_aTab ) { |
|
| 80 | 80 | $_aFormattedTab = $this->_getFormattedTab( $_aTab, $aTabs ); |
| 81 | 81 | if ( isset( $_aFormattedTab[ 'slug' ] ) ) { |
| 82 | 82 | $_aTab = $_aFormattedTab; |
@@ -127,12 +127,12 @@ discard block |
||
| 127 | 127 | private function _getTabs() { |
| 128 | 128 | |
| 129 | 129 | $_aOutput = array(); |
| 130 | - foreach( $this->aTabs as $_aTab ) { |
|
| 130 | + foreach ( $this->aTabs as $_aTab ) { |
|
| 131 | 131 | $_sTab = $this->_getTab( $_aTab ); |
| 132 | - if ( ! $_sTab ) { |
|
| 132 | + if ( !$_sTab ) { |
|
| 133 | 133 | continue; |
| 134 | 134 | } |
| 135 | - $_aOutput[] = $_sTab; |
|
| 135 | + $_aOutput[ ] = $_sTab; |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | $_aContainerAttributes = $this->aAttributes + array( 'class' => null ); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | return empty( $_aOutput ) |
| 145 | 145 | ? '' |
| 146 | - : "<{$this->sTabTag} " . $this->getAttributes( $_aContainerAttributes ) . ">" |
|
| 146 | + : "<{$this->sTabTag} ".$this->getAttributes( $_aContainerAttributes ).">" |
|
| 147 | 147 | . implode( '', $_aOutput ) |
| 148 | 148 | . "</{$this->sTabTag}>"; |
| 149 | 149 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * |
| 29 | 29 | * @since 3.3.0 |
| 30 | 30 | */ |
| 31 | - public function __construct( $oMsg=null ) { |
|
| 31 | + public function __construct( $oMsg = null ) { |
|
| 32 | 32 | |
| 33 | 33 | if ( $this->hasBeenCalled( get_class( $this ) ) ) { |
| 34 | 34 | return; |
@@ -87,10 +87,10 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public function _replyToPrintScript() { |
| 89 | 89 | $_sScript = $this->getScript( $this->oMsg ); |
| 90 | - if ( ! $_sScript ) { |
|
| 90 | + if ( !$_sScript ) { |
|
| 91 | 91 | return; |
| 92 | 92 | } |
| 93 | - echo "<script type='text/javascript' class='" . strtolower( get_class( $this ) ) . "'>" |
|
| 93 | + echo "<script type='text/javascript' class='".strtolower( get_class( $this ) )."'>" |
|
| 94 | 94 | . '/* <![CDATA[ */' |
| 95 | 95 | . $_sScript |
| 96 | 96 | . '/* ]]> */' |