@@ -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 ) |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @since 3.7.0 Changed the name from `AdminPageFramework_FormPart_SectionTitle`. |
16 | 16 | * @internal |
17 | 17 | */ |
18 | -class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base { |
|
18 | +class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base { |
|
19 | 19 | |
20 | 20 | public $aArguments = array( |
21 | 21 | 'title' => null, |
@@ -194,11 +194,11 @@ discard block |
||
194 | 194 | * @since 3.8.0 |
195 | 195 | * @internal |
196 | 196 | */ |
197 | - private function _getFieldsetsOutputInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
|
197 | + private function _getFieldsetsOutputInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
|
198 | 198 | |
199 | 199 | $_sOutput = ''; |
200 | 200 | foreach( $this->_getFieldsetsInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) as $_aFieldset ) { |
201 | - if ( empty( $_aFieldset ) ) { |
|
201 | + if ( empty( $_aFieldset ) ) { |
|
202 | 202 | continue; |
203 | 203 | } |
204 | 204 | $_sOutput .= $this->getFieldsetOutput( $_aFieldset ); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | * @since 3.7.0 Moved from `AdminPageFramework_FormPart_SectionTitle`. |
243 | 243 | * @return array|void |
244 | 244 | */ |
245 | - private function _getSectionTitleField( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
|
245 | + private function _getSectionTitleField( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
|
246 | 246 | |
247 | 247 | foreach( $aFieldsets as $_aFieldset ) { |
248 | 248 |
@@ -17,14 +17,14 @@ discard block |
||
17 | 17 | */ |
18 | 18 | class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base { |
19 | 19 | |
20 | - public $aArguments = array( |
|
20 | + public $aArguments = array( |
|
21 | 21 | 'title' => null, |
22 | 22 | 'tag' => null, |
23 | 23 | 'section_index' => null, |
24 | 24 | |
25 | 25 | 'sectionset' => array(), |
26 | 26 | ); |
27 | - public $aFieldsets = array(); |
|
27 | + public $aFieldsets = array(); |
|
28 | 28 | public $aSavedData = array(); |
29 | 29 | public $aFieldErrors = array(); |
30 | 30 | public $aFieldTypeDefinitions = array(); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @since 3.7.0 Moved from `AdminPageFramework_FormPart_SectionTitle`. |
91 | 91 | * @return string The section title output. |
92 | 92 | */ |
93 | - protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex=null, $aFieldTypeDefinitions=array(), $aCollapsible=array() ) { |
|
93 | + protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex = null, $aFieldTypeDefinitions = array(), $aCollapsible = array() ) { |
|
94 | 94 | |
95 | 95 | $_aSectionTitleFieldset = $this->_getSectionTitleField( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ); |
96 | 96 | $_sFieldsInSectionTitle = $this->_getFieldsetsOutputInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $_bHasOtherFields = $_sFieldsInSectionTitle |
101 | 101 | ? ' has-fields' |
102 | 102 | : ''; |
103 | - $_sOutput = $_sTitle . $_sFieldsInSectionTitle; |
|
103 | + $_sOutput = $_sTitle.$_sFieldsInSectionTitle; |
|
104 | 104 | return $_sOutput |
105 | 105 | ? "<div class='section-title-height-fixer'></div>" |
106 | 106 | . "<div class='section-title-outer-container'>" // 3.8.13+ For vertical alignment |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * @return string |
129 | 129 | */ |
130 | 130 | private function _getToolTip( $_aSectionset ) { |
131 | - $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ) . '_' . $this->aArguments[ 'section_index' ]; |
|
131 | + $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ).'_'.$this->aArguments[ 'section_index' ]; |
|
132 | 132 | $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
133 | 133 | $_aSectionset[ 'tip' ], |
134 | 134 | $_sSectionTitleTagID |
@@ -160,8 +160,8 @@ discard block |
||
160 | 160 | private function _getFieldsetsOutputInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
161 | 161 | |
162 | 162 | $_sOutput = ''; |
163 | - foreach( $this->_getFieldsetsInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) as $_aFieldset ) { |
|
164 | - if ( empty( $_aFieldset ) ) { |
|
163 | + foreach ( $this->_getFieldsetsInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) as $_aFieldset ) { |
|
164 | + if ( empty( $_aFieldset ) ) { |
|
165 | 165 | continue; |
166 | 166 | } |
167 | 167 | $_sOutput .= $this->getFieldsetOutput( $_aFieldset ); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | private function _getFieldsetsInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
178 | 178 | |
179 | 179 | $_aFieldsetsInSectionTitle = array(); |
180 | - foreach( $aFieldsets as $_aFieldset ) { |
|
180 | + foreach ( $aFieldsets as $_aFieldset ) { |
|
181 | 181 | |
182 | 182 | if ( 'section_title' !== $_aFieldset[ 'placement' ] ) { |
183 | 183 | continue; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $iSectionIndex, |
189 | 189 | $aFieldTypeDefinitions |
190 | 190 | ); |
191 | - $_aFieldsetsInSectionTitle[] = $_oFieldsetOutputFormatter->get(); |
|
191 | + $_aFieldsetsInSectionTitle[ ] = $_oFieldsetOutputFormatter->get(); |
|
192 | 192 | |
193 | 193 | } |
194 | 194 | return $_aFieldsetsInSectionTitle; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | */ |
208 | 208 | private function _getSectionTitleField( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
209 | 209 | |
210 | - foreach( $aFieldsets as $_aFieldset ) { |
|
210 | + foreach ( $aFieldsets as $_aFieldset ) { |
|
211 | 211 | |
212 | 212 | if ( 'section_title' !== $_aFieldset[ 'type' ] ) { |
213 | 213 | continue; |
@@ -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 {} |
@@ -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 | } |