@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @since 3.7.0 |
| 31 | 31 | */ |
| 32 | 32 | public function add( $sCSSRules ) { |
| 33 | - $this->aAdded[] = $sCSSRules; |
|
| 33 | + $this->aAdded[ ] = $sCSSRules; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | public function get() { |
| 41 | 41 | |
| 42 | - $_sCSSRules = $this->_get() . PHP_EOL; |
|
| 42 | + $_sCSSRules = $this->_get().PHP_EOL; |
|
| 43 | 43 | $_sCSSRules .= $this->_getVersionSpecific(); |
| 44 | 44 | $_sCSSRules .= implode( PHP_EOL, $this->aAdded ); |
| 45 | 45 | return $_sCSSRules; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | protected function _get() { |
| 24 | 24 | |
| 25 | - $_sSpinnerURL = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) ); |
|
| 25 | + $_sSpinnerURL = esc_url( admin_url( '/images/wpspin_light-2x.gif' ) ); |
|
| 26 | 26 | return <<<CSSRULES |
| 27 | 27 | .admin-page-framework-form-warning { |
| 28 | 28 | font-size: 1em; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | * @return string The generated field name model. |
| 35 | 35 | */ |
| 36 | 36 | public function getModel() { |
| 37 | - return $this->get() . '|' . $this->sIndexMark; |
|
| 37 | + return $this->get().'|'.$this->sIndexMark; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | return $_sResult; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - public function getModel() { |
|
| 29 | + public function getModel() { |
|
| 30 | 30 | return $this->get() . '[' . $this->sIndexMark . ']'; |
| 31 | 31 | } |
| 32 | 32 | |
@@ -25,8 +25,8 @@ discard block |
||
| 25 | 25 | return $_sResult; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - public function getModel() { |
|
| 29 | - return $this->get() . '[' . $this->sIndexMark . ']'; |
|
| 28 | + public function getModel() { |
|
| 29 | + return $this->get().'['.$this->sIndexMark.']'; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -34,14 +34,14 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | protected function _getFieldName() { |
| 36 | 36 | |
| 37 | - $_aFieldPath = $this->aArguments[ '_field_path_array' ]; |
|
| 38 | - if ( ! $this->_isSectionSet() ) { |
|
| 37 | + $_aFieldPath = $this->aArguments[ '_field_path_array' ]; |
|
| 38 | + if ( !$this->_isSectionSet() ) { |
|
| 39 | 39 | return $this->_getInputNameConstructed( $_aFieldPath ); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $_aSectionPath = $this->aArguments[ '_section_path_array' ]; |
| 43 | 43 | if ( $this->_isSectionSet() && isset( $this->aArguments[ '_section_index' ] ) ) { |
| 44 | - $_aSectionPath[] = $this->aArguments[ '_section_index' ]; |
|
| 44 | + $_aSectionPath[ ] = $this->aArguments[ '_section_index' ]; |
|
| 45 | 45 | } |
| 46 | 46 | $_sFieldName = $this->_getInputNameConstructed( |
| 47 | 47 | array_merge( $_aSectionPath, $_aFieldPath ) |
@@ -172,7 +172,7 @@ |
||
| 172 | 172 | . $this->getFrameworkNameVersion() |
| 173 | 173 | . ' (' |
| 174 | 174 | . $this->oMsg->get( 'debug_info_will_be_disabled' ) |
| 175 | - . ')' |
|
| 175 | + . ')' |
|
| 176 | 176 | . '</span>', |
| 177 | 177 | 'attributes' => array( |
| 178 | 178 | 'container' => array( |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | $aField = $this->aFieldset; |
| 71 | 71 | |
| 72 | - if ( ! $aField[ 'show_title_column' ] ) { |
|
| 72 | + if ( !$aField[ 'show_title_column' ] ) { |
|
| 73 | 73 | return ''; |
| 74 | 74 | } |
| 75 | 75 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | 'for' => $_oInputTagIDGenerator->get(), |
| 84 | 84 | ); |
| 85 | 85 | $_sOutput .= $aField[ 'title' ] |
| 86 | - ? "<label " . $this->getAttributes( $_aLabelAttributes ) . "'>" |
|
| 86 | + ? "<label ".$this->getAttributes( $_aLabelAttributes )."'>" |
|
| 87 | 87 | . "<a id='{$aField[ 'field_id' ]}'></a>" // to allow the browser to link to the element. |
| 88 | 88 | . "<span title='" |
| 89 | 89 | . esc_attr( |
@@ -114,12 +114,12 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | private function _getFieldOutputsInFieldTitleAreaFromNestedFields( $aField ) { |
| 116 | 116 | |
| 117 | - if ( ! $this->hasNestedFields( $aField ) ) { |
|
| 117 | + if ( !$this->hasNestedFields( $aField ) ) { |
|
| 118 | 118 | return ''; |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | $_sOutput = ''; |
| 122 | - foreach( $aField[ 'content' ] as $_aNestedField ) { |
|
| 122 | + foreach ( $aField[ 'content' ] as $_aNestedField ) { |
|
| 123 | 123 | |
| 124 | 124 | if ( 'field_title' !== $_aNestedField[ 'placement' ] ) { |
| 125 | 125 | continue; |
@@ -127,13 +127,13 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | $_oFieldset = new AdminPageFramework_Form_View___Fieldset( |
| 129 | 129 | $_aNestedField, |
| 130 | - $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference. |
|
| 130 | + $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference. |
|
| 131 | 131 | $this->aFieldErrors, |
| 132 | 132 | $this->aFieldTypeDefinitions, |
| 133 | 133 | $this->oMsg, |
| 134 | 134 | $this->aCallbacks // field output element callables. |
| 135 | 135 | ); |
| 136 | - $_sOutput .= $_oFieldset->get(); // field output |
|
| 136 | + $_sOutput .= $_oFieldset->get(); // field output |
|
| 137 | 137 | |
| 138 | 138 | } |
| 139 | 139 | return $_sOutput; |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | * @since 3.7.0 |
| 146 | 146 | */ |
| 147 | 147 | private function _getToolTip( $asTip, $sElementID ) { |
| 148 | - $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
|
| 148 | + $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
|
| 149 | 149 | $asTip, |
| 150 | 150 | $sElementID |
| 151 | 151 | ); |
@@ -159,14 +159,14 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | private function _getDebugInfo( $aField ) { |
| 161 | 161 | |
| 162 | - if ( ! $this->_shouldShowDebugInfo( $aField ) ) { |
|
| 162 | + if ( !$this->_shouldShowDebugInfo( $aField ) ) { |
|
| 163 | 163 | return ''; |
| 164 | 164 | } |
| 165 | - $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
|
| 165 | + $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
|
| 166 | 166 | array( |
| 167 | 167 | 'title' => $this->oMsg->get( 'field_arguments' ), |
| 168 | 168 | 'dash-icon' => 'dashicons-info', |
| 169 | - 'icon_alt_text' => '[' . $this->oMsg->get( 'debug' ) . ' ]', |
|
| 169 | + 'icon_alt_text' => '['.$this->oMsg->get( 'debug' ).' ]', |
|
| 170 | 170 | 'content' => AdminPageFramework_Debug::getDetails( $aField ) |
| 171 | 171 | . '<span class="admin-page-framework-info">' |
| 172 | 172 | . $this->getFrameworkNameVersion() |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | ), |
| 181 | 181 | ) |
| 182 | 182 | ), |
| 183 | - $aField[ 'field_id' ] . '_debug' |
|
| 183 | + $aField[ 'field_id' ].'_debug' |
|
| 184 | 184 | ); |
| 185 | 185 | return $_oToolTip->get(); |
| 186 | 186 | |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | */ |
| 192 | 192 | private function _shouldShowDebugInfo( $aField ) { |
| 193 | 193 | |
| 194 | - if ( ! $aField[ 'show_debug_info' ] ) { |
|
| 194 | + if ( !$aField[ 'show_debug_info' ] ) { |
|
| 195 | 195 | return false; |
| 196 | 196 | } |
| 197 | 197 | if ( strlen( $aField[ '_parent_field_path' ] ) ) { |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | */ |
| 208 | 208 | private function _getTitleColon( $aField ) { |
| 209 | 209 | |
| 210 | - if ( ! isset( $aField[ 'title' ] ) || '' === $aField[ 'title' ] ) { |
|
| 210 | + if ( !isset( $aField[ 'title' ] ) || '' === $aField[ 'title' ] ) { |
|
| 211 | 211 | return ''; |
| 212 | 212 | } |
| 213 | 213 | if ( |
@@ -215,8 +215,8 @@ discard block |
||
| 215 | 215 | $aField[ '_structure_type' ], |
| 216 | 216 | array( 'widget', 'post_meta_box', 'page_meta_box' ) |
| 217 | 217 | ) |
| 218 | - ){ |
|
| 219 | - return "<span class='title-colon'>:</span>" ; |
|
| 218 | + ) { |
|
| 219 | + return "<span class='title-colon'>:</span>"; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | } |
@@ -215,7 +215,7 @@ |
||
| 215 | 215 | $aField[ '_structure_type' ], |
| 216 | 216 | array( 'widget', 'post_meta_box', 'page_meta_box' ) |
| 217 | 217 | ) |
| 218 | - ){ |
|
| 218 | + ) { |
|
| 219 | 219 | return "<span class='title-colon'>:</span>" ; |
| 220 | 220 | } |
| 221 | 221 | |
@@ -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 | |
@@ -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 {} |
|