@@ -129,7 +129,7 @@ |
||
| 129 | 129 | private function ___setFieldResourcesBySection( $_aFieldsets ) { |
| 130 | 130 | |
| 131 | 131 | $_bIsSubSectionLoaded = false; |
| 132 | - foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
| 132 | + foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
| 133 | 133 | // @todo Examine if this structure is correct or not. |
| 134 | 134 | // It may not be necessary to check the sub-section dimensions as this is not the saved options array. |
| 135 | 135 | // if it's a sub-section |
@@ -90,16 +90,16 @@ discard block |
||
| 90 | 90 | 'AdminPageFramework_Form_View___CSS_FieldError', |
| 91 | 91 | 'AdminPageFramework_Form_View___CSS_ToolTip', |
| 92 | 92 | ); |
| 93 | - foreach( $_aClassNames as $_sClassName ) { |
|
| 93 | + foreach ( $_aClassNames as $_sClassName ) { |
|
| 94 | 94 | $_oCSS = new $_sClassName; |
| 95 | - $this->aResources[ 'internal_styles' ][] = $_oCSS->get(); |
|
| 95 | + $this->aResources[ 'internal_styles' ][ ] = $_oCSS->get(); |
|
| 96 | 96 | } |
| 97 | 97 | $_aClassNamesForIE = array( |
| 98 | 98 | 'AdminPageFramework_Form_View___CSS_CollapsibleSectionIE', |
| 99 | 99 | ); |
| 100 | - foreach( $_aClassNamesForIE as $_sClassName ) { |
|
| 100 | + foreach ( $_aClassNamesForIE as $_sClassName ) { |
|
| 101 | 101 | $_oCSS = new $_sClassName; |
| 102 | - $this->aResources[ 'internal_styles_ie' ][] = $_oCSS->get(); |
|
| 102 | + $this->aResources[ 'internal_styles_ie' ][ ] = $_oCSS->get(); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | * @return void |
| 118 | 118 | */ |
| 119 | 119 | private function ___set( $aAllFieldsets ) { |
| 120 | - foreach( $aAllFieldsets as $_sSecitonID => $_aFieldsets ) { |
|
| 120 | + foreach ( $aAllFieldsets as $_sSecitonID => $_aFieldsets ) { |
|
| 121 | 121 | $this->___setFieldResourcesBySection( $_aFieldsets ); |
| 122 | 122 | } |
| 123 | 123 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | private function ___setFieldResourcesBySection( $_aFieldsets ) { |
| 130 | 130 | |
| 131 | 131 | $_bIsSubSectionLoaded = false; |
| 132 | - foreach( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
| 132 | + foreach ( $_aFieldsets as $_iSubSectionIndexOrFieldID => $_aSubSectionOrField ) { |
|
| 133 | 133 | // @todo Examine if this structure is correct or not. |
| 134 | 134 | // It may not be necessary to check the sub-section dimensions as this is not the saved options array. |
| 135 | 135 | // if it's a sub-section |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | continue; |
| 141 | 141 | } |
| 142 | 142 | $_bIsSubSectionLoaded = true; |
| 143 | - foreach( $_aSubSectionOrField as $_aField ) { |
|
| 143 | + foreach ( $_aSubSectionOrField as $_aField ) { |
|
| 144 | 144 | $this->___setFieldResources( $_aField ); |
| 145 | 145 | } |
| 146 | 146 | continue; |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | private function ___setFieldResources( $aFieldset ) { |
| 166 | 166 | |
| 167 | 167 | // Check the field conditions. |
| 168 | - if ( ! $this->___isFieldsetAllowed( $aFieldset ) ) { |
|
| 168 | + if ( !$this->___isFieldsetAllowed( $aFieldset ) ) { |
|
| 169 | 169 | return; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | return $this->callBack( |
| 197 | 197 | $this->aCallbacks[ 'is_fieldset_registration_allowed' ], |
| 198 | 198 | array( |
| 199 | - true, // 1st parameter |
|
| 199 | + true, // 1st parameter |
|
| 200 | 200 | $aFieldset, // 2nd parameter |
| 201 | 201 | ) |
| 202 | 202 | ); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | */ |
| 209 | 209 | private function ___setResourcesOfNestedFields( $aFieldset ) { |
| 210 | 210 | |
| 211 | - if ( ! $this->hasFieldDefinitionsInContent( $aFieldset ) ) { |
|
| 211 | + if ( !$this->hasFieldDefinitionsInContent( $aFieldset ) ) { |
|
| 212 | 212 | return; |
| 213 | 213 | } |
| 214 | 214 | foreach ( $aFieldset[ 'content' ] as $_asNestedFieldset ) { |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | $this->callBack( |
| 249 | 249 | $this->aCallbacks[ 'load_fieldset_resource' ], |
| 250 | 250 | array( |
| 251 | - $aFieldset, // 1st parameter |
|
| 251 | + $aFieldset, // 1st parameter |
|
| 252 | 252 | ) |
| 253 | 253 | ); |
| 254 | 254 | |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | // Be careful not to add duplicate items as currently the sub-field items are parsed. |
| 257 | 257 | |
| 258 | 258 | // Is already registered? |
| 259 | - if ( $this->hasBeenCalled( 'registered_' . $_sFieldtype . '_' . $this->aArguments[ 'structure_type' ] ) ) { |
|
| 259 | + if ( $this->hasBeenCalled( 'registered_'.$_sFieldtype.'_'.$this->aArguments[ 'structure_type' ] ) ) { |
|
| 260 | 260 | return; |
| 261 | 261 | } |
| 262 | 262 | |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | $_aFieldTypeDefinition, |
| 272 | 272 | $this->aResources |
| 273 | 273 | ); |
| 274 | - $this->aResources = $_oFieldTypeResources->get(); |
|
| 274 | + $this->aResources = $_oFieldTypeResources->get(); |
|
| 275 | 275 | |
| 276 | 276 | } |
| 277 | 277 | |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | $this->oProp->aPluginTitleLinks = array_merge( |
| 91 | 91 | $this->oProp->aPluginTitleLinks, |
| 92 | 92 | $asLinks |
| 93 | - ); |
|
| 93 | + ); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | $this->_addFilterHook_PluginTitleActionLink(); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function _replyToSetFooterInfo() { |
| 38 | 38 | |
| 39 | - if ( ! $this->oProp->isPageAdded() ) { |
|
| 39 | + if ( !$this->oProp->isPageAdded() ) { |
|
| 40 | 40 | return; |
| 41 | 41 | } |
| 42 | 42 | parent::_replyToSetFooterInfo(); |
@@ -56,8 +56,8 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function _addLinkToPluginDescription( $asLinks ) { |
| 58 | 58 | |
| 59 | - if ( ! is_array( $asLinks ) ) { |
|
| 60 | - $this->oProp->aPluginDescriptionLinks[] = $asLinks; |
|
| 59 | + if ( !is_array( $asLinks ) ) { |
|
| 60 | + $this->oProp->aPluginDescriptionLinks[ ] = $asLinks; |
|
| 61 | 61 | } else { |
| 62 | 62 | $this->oProp->aPluginDescriptionLinks = array_merge( |
| 63 | 63 | $this->oProp->aPluginDescriptionLinks, |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function _addLinkToPluginTitle( $asLinks ) { |
| 86 | 86 | |
| 87 | - if ( ! is_array( $asLinks ) ) { |
|
| 88 | - $this->oProp->aPluginTitleLinks[] = $asLinks; |
|
| 87 | + if ( !is_array( $asLinks ) ) { |
|
| 88 | + $this->oProp->aPluginTitleLinks[ ] = $asLinks; |
|
| 89 | 89 | } else { |
| 90 | 90 | $this->oProp->aPluginTitleLinks = array_merge( |
| 91 | 91 | $this->oProp->aPluginTitleLinks, |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | $_sPluginBaseName = plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ); |
| 122 | 122 | add_filter( |
| 123 | - $this->_sFilterSuffix_PluginActionLinks . $_sPluginBaseName, |
|
| 123 | + $this->_sFilterSuffix_PluginActionLinks.$_sPluginBaseName, |
|
| 124 | 124 | array( $this, '_replyToAddPluginActionLinks' ) |
| 125 | 125 | ); |
| 126 | 126 | } |
@@ -133,14 +133,14 @@ discard block |
||
| 133 | 133 | * @return string |
| 134 | 134 | * @internal |
| 135 | 135 | */ |
| 136 | - public function _replyToAddInfoInFooterLeft( $sLinkHTML='' ) { |
|
| 136 | + public function _replyToAddInfoInFooterLeft( $sLinkHTML = '' ) { |
|
| 137 | 137 | |
| 138 | - if ( ! $this->_isPageAdded() ) { |
|
| 138 | + if ( !$this->_isPageAdded() ) { |
|
| 139 | 139 | return $sLinkHTML; // $sLinkHTML is given by the hook. |
| 140 | 140 | } |
| 141 | - $sLinkHTML = empty( $this->oProp->aScriptInfo['sName'] ) |
|
| 141 | + $sLinkHTML = empty( $this->oProp->aScriptInfo[ 'sName' ] ) |
|
| 142 | 142 | ? $sLinkHTML |
| 143 | - : $this->oProp->aFooterInfo['sLeft']; |
|
| 143 | + : $this->oProp->aFooterInfo[ 'sLeft' ]; |
|
| 144 | 144 | |
| 145 | 145 | $_sPageSlug = $this->oProp->getCurrentPageSlug(); |
| 146 | 146 | $_sTabSlug = $this->oProp->getCurrentTabSlug(); |
@@ -151,11 +151,11 @@ discard block |
||
| 151 | 151 | array( |
| 152 | 152 | $this->getAOrB( |
| 153 | 153 | $_sTabSlug, |
| 154 | - 'footer_left_' . $_sPageSlug . '_' . $_sTabSlug, |
|
| 154 | + 'footer_left_'.$_sPageSlug.'_'.$_sTabSlug, |
|
| 155 | 155 | null // will be ignored |
| 156 | 156 | ), |
| 157 | - 'footer_left_' . $_sPageSlug, |
|
| 158 | - 'footer_left_' . $this->oProp->sClassName |
|
| 157 | + 'footer_left_'.$_sPageSlug, |
|
| 158 | + 'footer_left_'.$this->oProp->sClassName |
|
| 159 | 159 | ), |
| 160 | 160 | $sLinkHTML |
| 161 | 161 | ); |
@@ -169,9 +169,9 @@ discard block |
||
| 169 | 169 | * @return string |
| 170 | 170 | * @internal |
| 171 | 171 | */ |
| 172 | - public function _replyToAddInfoInFooterRight( $sLinkHTML='' ) { |
|
| 172 | + public function _replyToAddInfoInFooterRight( $sLinkHTML = '' ) { |
|
| 173 | 173 | |
| 174 | - if ( ! $this->_isPageAdded() ) { |
|
| 174 | + if ( !$this->_isPageAdded() ) { |
|
| 175 | 175 | return $sLinkHTML; // $sLinkTHML is given by the hook. |
| 176 | 176 | } |
| 177 | 177 | |
@@ -184,13 +184,13 @@ discard block |
||
| 184 | 184 | array( |
| 185 | 185 | $this->getAOrB( |
| 186 | 186 | $_sTabSlug, |
| 187 | - 'footer_right_' . $_sPageSlug . '_' . $_sTabSlug, |
|
| 187 | + 'footer_right_'.$_sPageSlug.'_'.$_sTabSlug, |
|
| 188 | 188 | null // will be ignored |
| 189 | 189 | ), |
| 190 | - 'footer_right_' . $_sPageSlug, |
|
| 191 | - 'footer_right_' . $this->oProp->sClassName |
|
| 190 | + 'footer_right_'.$_sPageSlug, |
|
| 191 | + 'footer_right_'.$this->oProp->sClassName |
|
| 192 | 192 | ), |
| 193 | - $this->oProp->aFooterInfo['sRight'] |
|
| 193 | + $this->oProp->aFooterInfo[ 'sRight' ] |
|
| 194 | 194 | ); |
| 195 | 195 | |
| 196 | 196 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | * @internal |
| 203 | 203 | */ |
| 204 | 204 | private function _isPageAdded() { |
| 205 | - if ( ! isset( $_GET[ 'page' ] ) ) { // sanitization unnecessary |
|
| 205 | + if ( !isset( $_GET[ 'page' ] ) ) { // sanitization unnecessary |
|
| 206 | 206 | return false; |
| 207 | 207 | } |
| 208 | 208 | return ( boolean ) $this->oProp->isPageAdded( $_GET[ 'page' ] ); // sanitization unnecessary |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | : $this->oProp->sLabelPluginSettingsLink; |
| 227 | 227 | |
| 228 | 228 | // If the user disables the settings link, the label property is empty. If so, do not add it. |
| 229 | - if ( ! $this->oProp->sLabelPluginSettingsLink ) { |
|
| 229 | + if ( !$this->oProp->sLabelPluginSettingsLink ) { |
|
| 230 | 230 | return $aLinks; |
| 231 | 231 | } |
| 232 | 232 | |
@@ -244,13 +244,13 @@ discard block |
||
| 244 | 244 | array_unshift( |
| 245 | 245 | $aLinks, |
| 246 | 246 | // '<a href="' . esc_url( $_sLinkURL ) . '">' |
| 247 | - '<a ' . $this->getAttributes( |
|
| 247 | + '<a '.$this->getAttributes( |
|
| 248 | 248 | array( |
| 249 | 249 | 'href' => esc_url( $_sLinkURL ), |
| 250 | 250 | // 3.5.7+ Added for acceptance testing |
| 251 | 251 | 'class' => 'apf-plugin-title-action-link apf-post-type', |
| 252 | 252 | ) |
| 253 | - ) . '>' |
|
| 253 | + ).'>' |
|
| 254 | 254 | . $this->oProp->sLabelPluginSettingsLink |
| 255 | 255 | . '</a>' |
| 256 | 256 | ); |
@@ -273,16 +273,16 @@ discard block |
||
| 273 | 273 | |
| 274 | 274 | // Backward compatibility sanitisation. |
| 275 | 275 | $_aAddingLinks = array(); |
| 276 | - foreach( array_filter( $this->oProp->aPluginDescriptionLinks ) as $_sLLinkHTML ) { |
|
| 276 | + foreach ( array_filter( $this->oProp->aPluginDescriptionLinks ) as $_sLLinkHTML ) { |
|
| 277 | 277 | |
| 278 | - if ( ! $_sLLinkHTML ) { |
|
| 278 | + if ( !$_sLLinkHTML ) { |
|
| 279 | 279 | continue; |
| 280 | 280 | } |
| 281 | 281 | if ( is_array( $_sLLinkHTML ) ) { // should not be an array |
| 282 | 282 | $_aAddingLinks = array_merge( $_sLLinkHTML, $_aAddingLinks ); |
| 283 | 283 | continue; |
| 284 | 284 | } |
| 285 | - $_aAddingLinks[] = ( string ) $_sLLinkHTML; |
|
| 285 | + $_aAddingLinks[ ] = ( string ) $_sLLinkHTML; |
|
| 286 | 286 | |
| 287 | 287 | } |
| 288 | 288 | return array_merge( $aLinks, $_aAddingLinks ); |
@@ -299,13 +299,13 @@ discard block |
||
| 299 | 299 | public function _replyToAddPluginActionLinks( $aLinks ) { |
| 300 | 300 | |
| 301 | 301 | $_aAddingLinks = array(); |
| 302 | - foreach( array_filter( $this->oProp->aPluginTitleLinks ) as $_sLinkHTML ) { |
|
| 302 | + foreach ( array_filter( $this->oProp->aPluginTitleLinks ) as $_sLinkHTML ) { |
|
| 303 | 303 | |
| 304 | 304 | if ( is_array( $_sLinkHTML ) ) { |
| 305 | 305 | $_aAddingLinks = array_merge( $_sLinkHTML, $_aAddingLinks ); |
| 306 | 306 | continue; |
| 307 | 307 | } |
| 308 | - $_aAddingLinks[] = ( string ) $_sLinkHTML; |
|
| 308 | + $_aAddingLinks[ ] = ( string ) $_sLinkHTML; |
|
| 309 | 309 | |
| 310 | 310 | } |
| 311 | 311 | return array_merge( $aLinks, $_aAddingLinks ); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function _replyToSetFooterInfo() { |
| 38 | 38 | |
| 39 | - if ( ! $this->oProp->isPageAdded() ) { |
|
| 39 | + if ( ! $this->oProp->isPageAdded() ) { |
|
| 40 | 40 | return; |
| 41 | 41 | } |
| 42 | 42 | parent::_replyToSetFooterInfo(); |
@@ -202,7 +202,8 @@ discard block |
||
| 202 | 202 | * @internal |
| 203 | 203 | */ |
| 204 | 204 | private function _isPageAdded() { |
| 205 | - if ( ! isset( $_GET[ 'page' ] ) ) { // sanitization unnecessary |
|
| 205 | + if ( ! isset( $_GET[ 'page' ] ) ) { |
|
| 206 | +// sanitization unnecessary |
|
| 206 | 207 | return false; |
| 207 | 208 | } |
| 208 | 209 | return ( boolean ) $this->oProp->isPageAdded( $_GET[ 'page' ] ); // sanitization unnecessary |
@@ -217,7 +218,7 @@ discard block |
||
| 217 | 218 | public function _replyToAddSettingsLinkInPluginListingPage( $aLinks ) { |
| 218 | 219 | |
| 219 | 220 | // If the sub-pages are not added, do nothing. |
| 220 | - if ( count( $this->oProp->aPages ) < 1 ) { |
|
| 221 | + if ( count( $this->oProp->aPages ) < 1 ) { |
|
| 221 | 222 | return $aLinks; |
| 222 | 223 | } |
| 223 | 224 | |
@@ -267,7 +268,7 @@ discard block |
||
| 267 | 268 | */ |
| 268 | 269 | public function _replyToAddLinkToPluginDescription( $aLinks, $sFile ) { |
| 269 | 270 | |
| 270 | - if ( $sFile !== plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ) ) { |
|
| 271 | + if ( $sFile !== plugin_basename( $this->oProp->aScriptInfo[ 'sPath' ] ) ) { |
|
| 271 | 272 | return $aLinks; |
| 272 | 273 | } |
| 273 | 274 | |
@@ -278,7 +279,8 @@ discard block |
||
| 278 | 279 | if ( ! $_sLLinkHTML ) { |
| 279 | 280 | continue; |
| 280 | 281 | } |
| 281 | - if ( is_array( $_sLLinkHTML ) ) { // should not be an array |
|
| 282 | + if ( is_array( $_sLLinkHTML ) ) { |
|
| 283 | +// should not be an array |
|
| 282 | 284 | $_aAddingLinks = array_merge( $_sLLinkHTML, $_aAddingLinks ); |
| 283 | 285 | continue; |
| 284 | 286 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $_sTag = $this->_getInPageTabTag( $sTag, $_aPage ); |
| 74 | 74 | |
| 75 | 75 | // If the in-page tabs' visibility is set to false, returns the title. |
| 76 | - if ( ! $_aPage[ 'show_in_page_tabs' ] ) { |
|
| 76 | + if ( !$_aPage[ 'show_in_page_tabs' ] ) { |
|
| 77 | 77 | return $this->getElement( $aInPageTabs, array( $_sCurrentTabSlug, 'title' ) ) |
| 78 | 78 | ? "<{$_sTag} class='admin-page-framework-in-page-tab-title'>" |
| 79 | 79 | . $aInPageTabs[ $_sCurrentTabSlug ][ 'title' ] |
@@ -100,9 +100,9 @@ discard block |
||
| 100 | 100 | private function _getInPageTabNavigationBar( array $aTabs, $sActiveTab, $sCurrentPageSlug, $sTag ) { |
| 101 | 101 | |
| 102 | 102 | $_oTabBar = new AdminPageFramework_TabNavigationBar( |
| 103 | - $aTabs, // tabs |
|
| 103 | + $aTabs, // tabs |
|
| 104 | 104 | $sActiveTab, // active tab slug |
| 105 | - $sTag, // container tag |
|
| 105 | + $sTag, // container tag |
|
| 106 | 106 | array( // container attributes |
| 107 | 107 | 'class' => 'in-page-tab', |
| 108 | 108 | ), |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | * @since 3.5.10 |
| 131 | 131 | * @since 3.6.3 Moved from `AdminPageFramework_Page_View`. |
| 132 | 132 | */ |
| 133 | - public function _replyToFormatNavigationTabItem_InPageTab( array $aTab, array $aStructure, array $aTabs, array $aArguments=array() ) { |
|
| 133 | + public function _replyToFormatNavigationTabItem_InPageTab( array $aTab, array $aStructure, array $aTabs, array $aArguments = array() ) { |
|
| 134 | 134 | $_oFormatter = new AdminPageFramework_Format_NavigationTab_InPageTab( |
| 135 | 135 | $aTab, |
| 136 | 136 | $aStructure, |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | return self::$_oInstance; |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - self::$aClassNames[] = $oProp->sClassName; |
|
| 34 | + self::$aClassNames[ ] = $oProp->sClassName; |
|
| 35 | 35 | self::$_oInstance = new AdminPageFramework_PageLoadInfo_admin_page( $oProp, $oMsg ); |
| 36 | 36 | |
| 37 | 37 | return self::$_oInstance; |
@@ -82,4 +82,4 @@ |
||
| 82 | 82 | * @package AdminPageFramework/Factory/NetworkAdmin |
| 83 | 83 | * @heading Network Admin Page |
| 84 | 84 | */ |
| 85 | -abstract class AdminPageFramework_NetworkAdmin_Documentation extends AdminPageFramework_Documentaiton{} |
|
| 85 | +abstract class AdminPageFramework_NetworkAdmin_Documentation extends AdminPageFramework_Documentaiton {} |
|
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * @param array $aParameters The parameters to pass to the constructor of the class set in the first parameter. |
| 49 | 49 | * @return object An object instance of the class specified in the first parameter. |
| 50 | 50 | */ |
| 51 | - static public function getInstance( $sClassName, array $aParameters=array() ) { |
|
| 51 | + static public function getInstance( $sClassName, array $aParameters = array() ) { |
|
| 52 | 52 | |
| 53 | 53 | $_oReflection = new ReflectionClass( $sClassName ); |
| 54 | 54 | return $_oReflection->newInstanceArgs( $aParameters ); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | // For PHP 5.2.x or below |
| 70 | 70 | if ( version_compare( phpversion(), '<', '5.3.0' ) ) { |
| 71 | 71 | trigger_error( |
| 72 | - 'Program Name' . ': ' |
|
| 72 | + 'Program Name'.': ' |
|
| 73 | 73 | . sprintf( |
| 74 | 74 | 'The method cannot run with your PHP version: %1$s', |
| 75 | 75 | phpversion() |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | * If accessed from a console, include the registry class to laod 'AdminPageFramework_Registry_Base'. |
| 12 | 12 | */ |
| 13 | 13 | if ( php_sapi_name() === 'cli' ) { |
| 14 | - $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ) . '/admin-page-framework.php'; |
|
| 14 | + $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ).'/admin-page-framework.php'; |
|
| 15 | 15 | if ( file_exists( $_sFrameworkFilePath ) ) { |
| 16 | 16 | include_once( $_sFrameworkFilePath ); |
| 17 | 17 | } |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | * If accessed from a console, include the registry class to laod 'AdminPageFramework_Registry_Base'. |
| 12 | 12 | */ |
| 13 | 13 | if ( php_sapi_name() === 'cli' ) { |
| 14 | - $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ) . '/admin-page-framework.php'; |
|
| 14 | + $_sFrameworkFilePath = dirname( dirname( __FILE__ ) ).'/admin-page-framework.php'; |
|
| 15 | 15 | if ( file_exists( $_sFrameworkFilePath ) ) { |
| 16 | 16 | include_once( $_sFrameworkFilePath ); |
| 17 | 17 | } |
@@ -18,19 +18,19 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | public function start() { |
| 20 | 20 | |
| 21 | - if ( ! $this->oProp->bIsAdmin ) { |
|
| 21 | + if ( !$this->oProp->bIsAdmin ) { |
|
| 22 | 22 | return; |
| 23 | 23 | } |
| 24 | - if ( ! is_network_admin() ) { |
|
| 24 | + if ( !is_network_admin() ) { |
|
| 25 | 25 | return; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | // Enable / disable the demo pages |
| 29 | - if ( isset( $_GET['enable_apfl_demo_pages'] ) ) { |
|
| 29 | + if ( isset( $_GET[ 'enable_apfl_demo_pages' ] ) ) { |
|
| 30 | 30 | |
| 31 | 31 | // Update the options and reload the page |
| 32 | - $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys['main'] ); |
|
| 33 | - $_oOption->update( 'enable_demo', $_GET['enable_apfl_demo_pages'] ); |
|
| 32 | + $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ] ); |
|
| 33 | + $_oOption->update( 'enable_demo', $_GET[ 'enable_apfl_demo_pages' ] ); |
|
| 34 | 34 | |
| 35 | 35 | $this->setSettingNotice( |
| 36 | 36 | __( 'Enabled demo!', 'admin-page-framework-loader' ), |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $this->_getDemoSwitcherLink( $this->oProp->aOptions ) |
| 58 | 58 | ); |
| 59 | 59 | $this->addLinkToPluginDescription( |
| 60 | - "<a href='https://wordpress.org/support/plugin/admin-page-framework' target='_blank'>" . __( 'Support', 'admin-page-framework-loader' ) . "</a>" |
|
| 60 | + "<a href='https://wordpress.org/support/plugin/admin-page-framework' target='_blank'>".__( 'Support', 'admin-page-framework-loader' )."</a>" |
|
| 61 | 61 | ); |
| 62 | 62 | |
| 63 | 63 | } |
@@ -65,10 +65,10 @@ discard block |
||
| 65 | 65 | /** |
| 66 | 66 | * Returns the switch link of the demo pages. |
| 67 | 67 | */ |
| 68 | - private function _getDemoSwitcherLink( $mOptions=array() ) { |
|
| 68 | + private function _getDemoSwitcherLink( $mOptions = array() ) { |
|
| 69 | 69 | |
| 70 | - $_bEnabled = isset( $mOptions['enable_demo'] ) && $mOptions['enable_demo']; |
|
| 71 | - $_sLink = esc_url( |
|
| 70 | + $_bEnabled = isset( $mOptions[ 'enable_demo' ] ) && $mOptions[ 'enable_demo' ]; |
|
| 71 | + $_sLink = esc_url( |
|
| 72 | 72 | add_query_arg( |
| 73 | 73 | array( |
| 74 | 74 | 'enable_apfl_demo_pages' => $_bEnabled ? 0 : 1, |
@@ -76,8 +76,8 @@ discard block |
||
| 76 | 76 | ) |
| 77 | 77 | ); |
| 78 | 78 | return $_bEnabled |
| 79 | - ? "<a href='{$_sLink}'>" . __( 'Disable Demo', 'admin-page-framework-loader' ) . "</a>" |
|
| 80 | - : "<a href='{$_sLink}'><strong style='font-size: 1em;'>" . __( 'Enable Demo', 'admin-page-framework-loader' ) . "</strong></a>"; |
|
| 79 | + ? "<a href='{$_sLink}'>".__( 'Disable Demo', 'admin-page-framework-loader' )."</a>" |
|
| 80 | + : "<a href='{$_sLink}'><strong style='font-size: 1em;'>".__( 'Enable Demo', 'admin-page-framework-loader' )."</strong></a>"; |
|
| 81 | 81 | |
| 82 | 82 | } |
| 83 | 83 | |