@@ -107,8 +107,8 @@ |
||
107 | 107 | } |
108 | 108 | CSSRULES; |
109 | 109 | |
110 | - return $_sCSS . PHP_EOL |
|
111 | - . self::_getPageLoadStatsRules() . PHP_EOL |
|
110 | + return $_sCSS.PHP_EOL |
|
111 | + . self::_getPageLoadStatsRules().PHP_EOL |
|
112 | 112 | . self::_getVersionSpecificRules(); |
113 | 113 | |
114 | 114 | } |
@@ -57,25 +57,25 @@ |
||
57 | 57 | } |
58 | 58 | |
59 | 59 | // If the section ID is not registered, return false. |
60 | - if ( ! array_key_exists( $sID, $this->aSectionsets ) ) { |
|
60 | + if ( ! array_key_exists( $sID, $this->aSectionsets ) ) { |
|
61 | 61 | return false; |
62 | 62 | } |
63 | 63 | |
64 | 64 | // the fields array's first dimension is also filled with the keys of section ids. |
65 | - if ( ! array_key_exists( $sID, $this->aFieldsets ) ) { |
|
65 | + if ( ! array_key_exists( $sID, $this->aFieldsets ) ) { |
|
66 | 66 | return false; |
67 | 67 | } |
68 | 68 | |
69 | 69 | // Since numeric IDs are denied at the beginning of the method, the elements will not be sub-sections. |
70 | 70 | $_bIsSeciton = false; |
71 | - foreach( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
71 | + foreach( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
72 | 72 | |
73 | - if ( $_sSectionID == $sID ) { |
|
73 | + if ( $_sSectionID == $sID ) { |
|
74 | 74 | $_bIsSeciton = true; |
75 | 75 | } |
76 | 76 | |
77 | 77 | // a field using the ID is found, and it precedes a section match. |
78 | - if ( array_key_exists( $sID, $_aFields ) ) { |
|
78 | + if ( array_key_exists( $sID, $_aFields ) ) { |
|
79 | 79 | return false; |
80 | 80 | } |
81 | 81 |
@@ -60,18 +60,18 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | // If the section ID is not registered, return false. |
63 | - if ( ! array_key_exists( $sID, $this->aSectionsets ) ) { |
|
63 | + if ( !array_key_exists( $sID, $this->aSectionsets ) ) { |
|
64 | 64 | return false; |
65 | 65 | } |
66 | 66 | |
67 | 67 | // the fields array's first dimension is also filled with the keys of section ids. |
68 | - if ( ! array_key_exists( $sID, $this->aFieldsets ) ) { |
|
68 | + if ( !array_key_exists( $sID, $this->aFieldsets ) ) { |
|
69 | 69 | return false; |
70 | 70 | } |
71 | 71 | |
72 | 72 | // Since numeric IDs are denied at the beginning of the method, the elements will not be sub-sections. |
73 | 73 | $_bIsSeciton = false; |
74 | - foreach( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
74 | + foreach ( $this->aFieldsets as $_sSectionID => $_aFields ) { |
|
75 | 75 | |
76 | 76 | if ( $_sSectionID == $sID ) { |
77 | 77 | $_bIsSeciton = true; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function canUserView( $sCapability ) { |
100 | 100 | |
101 | - if ( ! $sCapability ) { |
|
101 | + if ( !$sCapability ) { |
|
102 | 102 | return true; |
103 | 103 | } |
104 | 104 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | array( $this, '_replyToRegisterFormItems' ), |
30 | 30 | 100 // priority - low value is set as meta boxes use the `current_screen` action hook for `setUp()`. |
31 | 31 | ); |
32 | - } else { |
|
32 | + } else { |
|
33 | 33 | add_action( |
34 | 34 | $this->aArguments[ 'action_hook_form_registration' ], |
35 | 35 | array( $this, '_replyToRegisterFormItems' ) |
@@ -147,12 +147,12 @@ discard block |
||
147 | 147 | * Changed the name from `getFieldsModel()`. |
148 | 148 | * @return array |
149 | 149 | */ |
150 | - public function getDataStructureFromAddedFieldsets() { |
|
150 | + public function getDataStructureFromAddedFieldsets() { |
|
151 | 151 | |
152 | 152 | $_aFormDataStructure = array(); |
153 | 153 | foreach ( $this->getAsArray( $this->aFieldsets ) as $_sSectionID => $_aFieldsets ) { |
154 | 154 | |
155 | - if ( $_sSectionID != '_default' ) { |
|
155 | + if ( $_sSectionID != '_default' ) { |
|
156 | 156 | $_aFormDataStructure[ $_sSectionID ] = $_aFieldsets; |
157 | 157 | continue; |
158 | 158 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | * @param array $aSubject The subject array to modify. Usually the saved option data. |
186 | 186 | * @return array The modified options array. |
187 | 187 | */ |
188 | - public function dropRepeatableElements( array $aSubject ) { |
|
188 | + public function dropRepeatableElements( array $aSubject ) { |
|
189 | 189 | $_oFilterRepeatableElements = new AdminPageFramework_Form_Model___Modifier_FilterRepeatableElements( |
190 | 190 | $aSubject, |
191 | 191 | $this->getElementAsArray( |
@@ -402,7 +402,6 @@ discard block |
||
402 | 402 | * |
403 | 403 | * @since 3.7.0 |
404 | 404 | * @param array $aSavedData |
405 | - * @param boolean $bOnlyFieldsets Whether to format only the fieldsets. The taxonomy field factory uses this parameter. |
|
406 | 405 | */ |
407 | 406 | protected function _formatElementDefinitions( array $aSavedData ) { |
408 | 407 | |
@@ -438,7 +437,6 @@ discard block |
||
438 | 437 | * Changed the name from `_getFieldErrors()`. |
439 | 438 | * @access public The field type class accesses this method to render nested fields. |
440 | 439 | * @internal |
441 | - * @param boolean $bDelete whether or not the transient should be deleted after retrieving it. |
|
442 | 440 | * @return array |
443 | 441 | */ |
444 | 442 | public function getFieldErrors() { |
@@ -43,10 +43,10 @@ discard block |
||
43 | 43 | * @since 3.7.0 |
44 | 44 | * @return array |
45 | 45 | */ |
46 | - public function getSubmittedData( array $aDataToParse, $bExtractFromFieldStructure=true, $bStripSlashes=true ) { |
|
46 | + public function getSubmittedData( array $aDataToParse, $bExtractFromFieldStructure = true, $bStripSlashes = true ) { |
|
47 | 47 | |
48 | 48 | // Extracts the form data from the subject data for parsing |
49 | - $_aSubmittedFormData = $bExtractFromFieldStructure |
|
49 | + $_aSubmittedFormData = $bExtractFromFieldStructure |
|
50 | 50 | ? $this->castArrayContents( |
51 | 51 | $this->getDataStructureFromAddedFieldsets(), // form data (options) structure |
52 | 52 | $aDataToParse // the subject data array, usually $_POST. |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | : $aDataToParse; |
55 | 55 | |
56 | 56 | // 3.6.0 - sorts dynamic elements. |
57 | - $_aSubmittedFormData = $this->getSortedInputs( $_aSubmittedFormData ); |
|
57 | + $_aSubmittedFormData = $this->getSortedInputs( $_aSubmittedFormData ); |
|
58 | 58 | |
59 | 59 | return $bStripSlashes |
60 | 60 | ? stripslashes_deep( $_aSubmittedFormData ) // fixes magic quotes |
@@ -79,12 +79,12 @@ discard block |
||
79 | 79 | array_merge( |
80 | 80 | $this->getElementAsArray( |
81 | 81 | $_POST, |
82 | - '__repeatable_elements_' . $this->aArguments[ 'structure_type' ], |
|
82 | + '__repeatable_elements_'.$this->aArguments[ 'structure_type' ], |
|
83 | 83 | array() |
84 | 84 | ), |
85 | 85 | $this->getElementAsArray( |
86 | 86 | $_POST, |
87 | - '__sortable_elements_' . $this->aArguments[ 'structure_type' ], |
|
87 | + '__sortable_elements_'.$this->aArguments[ 'structure_type' ], |
|
88 | 88 | array() |
89 | 89 | ) |
90 | 90 | ) |
@@ -147,9 +147,9 @@ discard block |
||
147 | 147 | * Changed the name from `getFieldsModel()`. |
148 | 148 | * @return array |
149 | 149 | */ |
150 | - public function getDataStructureFromAddedFieldsets() { |
|
150 | + public function getDataStructureFromAddedFieldsets() { |
|
151 | 151 | |
152 | - $_aFormDataStructure = array(); |
|
152 | + $_aFormDataStructure = array(); |
|
153 | 153 | foreach ( $this->getAsArray( $this->aFieldsets ) as $_sSectionID => $_aFieldsets ) { |
154 | 154 | |
155 | 155 | if ( $_sSectionID != '_default' ) { |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | } |
159 | 159 | |
160 | 160 | // For default field items. |
161 | - foreach( $_aFieldsets as $_sFieldID => $_aFieldset ) { |
|
161 | + foreach ( $_aFieldsets as $_sFieldID => $_aFieldset ) { |
|
162 | 162 | $_aFormDataStructure[ $_aFieldset[ 'field_id' ] ] = $_aFieldset; |
163 | 163 | } |
164 | 164 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $aSubject, |
191 | 191 | $this->getElementAsArray( |
192 | 192 | $_POST, |
193 | - '__repeatable_elements_' . $this->aArguments[ 'structure_type' ] |
|
193 | + '__repeatable_elements_'.$this->aArguments[ 'structure_type' ] |
|
194 | 194 | ) |
195 | 195 | ); |
196 | 196 | return $_oFilterRepeatableElements->get(); |
@@ -203,13 +203,13 @@ discard block |
||
203 | 203 | public function _replyToRegisterFormItems() { |
204 | 204 | |
205 | 205 | // Check if the form should be created or not. |
206 | - if ( ! $this->isInThePage() ) { |
|
206 | + if ( !$this->isInThePage() ) { |
|
207 | 207 | return; |
208 | 208 | } |
209 | 209 | |
210 | 210 | // Load field type definitions. |
211 | - $this->_setFieldTypeDefinitions( 'admin_page_framework' ); // site-wide |
|
212 | - $this->_setFieldTypeDefinitions( $this->aArguments[ 'caller_id' ] ); // per class |
|
211 | + $this->_setFieldTypeDefinitions( 'admin_page_framework' ); // site-wide |
|
212 | + $this->_setFieldTypeDefinitions( $this->aArguments[ 'caller_id' ] ); // per class |
|
213 | 213 | |
214 | 214 | // Set the options array |
215 | 215 | $this->aSavedData = $this->_getSavedData( |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $this->aArguments, |
238 | 238 | $this->aFieldsets, |
239 | 239 | self::$_aResources, |
240 | - $this->aFieldTypeDefinitions, // must be called after performing `_setFieldTypeDefinitions()`. |
|
240 | + $this->aFieldTypeDefinitions, // must be called after performing `_setFieldTypeDefinitions()`. |
|
241 | 241 | $this->aCallbacks |
242 | 242 | ); |
243 | 243 | self::$_aResources = $_oFieldResources->get(); // updates the property |
@@ -254,10 +254,10 @@ discard block |
||
254 | 254 | $this->callBack( |
255 | 255 | $this->aCallbacks[ 'handle_form_data' ], |
256 | 256 | array( |
257 | - $this->aSavedData, // 1st parameter |
|
258 | - $this->aArguments, // 2nd parameter |
|
259 | - $this->aSectionsets, // 3rd parameter |
|
260 | - $this->aFieldsets, // 4th parameter |
|
257 | + $this->aSavedData, // 1st parameter |
|
258 | + $this->aArguments, // 2nd parameter |
|
259 | + $this->aSectionsets, // 3rd parameter |
|
260 | + $this->aFieldsets, // 4th parameter |
|
261 | 261 | ) |
262 | 262 | ); |
263 | 263 | |
@@ -271,15 +271,15 @@ discard block |
||
271 | 271 | $this->aSectionsets = $this->callBack( |
272 | 272 | $this->aCallbacks[ 'secitonsets_before_registration' ], |
273 | 273 | array( |
274 | - $this->aSectionsets, // 1st parameter |
|
274 | + $this->aSectionsets, // 1st parameter |
|
275 | 275 | ) |
276 | 276 | ); |
277 | 277 | // Let the main routine modify the fieldsets definition array. |
278 | 278 | $this->aFieldsets = $this->callBack( |
279 | 279 | $this->aCallbacks[ 'fieldsets_before_registration' ], |
280 | 280 | array( |
281 | - $this->aFieldsets, // 1st parameter |
|
282 | - $this->aSectionsets, // 2nd parameter |
|
281 | + $this->aFieldsets, // 1st parameter |
|
282 | + $this->aSectionsets, // 2nd parameter |
|
283 | 283 | ) |
284 | 284 | ); |
285 | 285 |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $aOptions // data source |
69 | 69 | ); |
70 | 70 | |
71 | - foreach( $aOptions as $_sSectionID => $_aSubSectionOrFields ) { |
|
71 | + foreach ( $aOptions as $_sSectionID => $_aSubSectionOrFields ) { |
|
72 | 72 | |
73 | 73 | $_aSubSection = $this->_getSubSectionFromOptions( |
74 | 74 | $_sSectionID, |
@@ -105,10 +105,10 @@ discard block |
||
105 | 105 | |
106 | 106 | $_aSubSection = array(); |
107 | 107 | $_iPrevIndex = null; |
108 | - foreach( $_aSubSectionOrFields as $_isIndexOrFieldID => $_aSubSectionOrFieldOptions ) { |
|
108 | + foreach ( $_aSubSectionOrFields as $_isIndexOrFieldID => $_aSubSectionOrFieldOptions ) { |
|
109 | 109 | |
110 | 110 | // If it is not a sub-section array, skip. |
111 | - if ( ! $this->isNumericInteger( $_isIndexOrFieldID ) ) { |
|
111 | + if ( !$this->isNumericInteger( $_isIndexOrFieldID ) ) { |
|
112 | 112 | continue; |
113 | 113 | } |
114 | 114 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | ); |
123 | 123 | |
124 | 124 | // Update the internal section index key |
125 | - foreach( $_aSubSection[ $_iIndex ] as &$_aField ) { |
|
125 | + foreach ( $_aSubSection[ $_iIndex ] as &$_aField ) { |
|
126 | 126 | $_aField[ '_section_index' ] = $_iIndex; |
127 | 127 | } |
128 | 128 | unset( $_aField ); // to be safe in PHP |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | private function _getSubSectionItemsFromOptions( array $_aSubSection, $_sSectionID, $_iIndex, $_iPrevIndex ) { |
149 | 149 | |
150 | - if ( ! isset( $this->aFieldsets[ $_sSectionID ] ) ) { |
|
150 | + if ( !isset( $this->aFieldsets[ $_sSectionID ] ) ) { |
|
151 | 151 | return array(); |
152 | 152 | } |
153 | 153 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | : $this->getNonIntegerKeyElements( $this->aFieldsets[ $_sSectionID ] ); |
157 | 157 | |
158 | 158 | // if empty, merge with the previous element. |
159 | - return ! empty( $_aFields ) |
|
159 | + return !empty( $_aFields ) |
|
160 | 160 | ? $_aFields |
161 | 161 | : $this->getElementAsArray( |
162 | 162 | $_aSubSection, |
@@ -108,7 +108,7 @@ |
||
108 | 108 | foreach( $_aSubSectionOrFields as $_isIndexOrFieldID => $_aSubSectionOrFieldOptions ) { |
109 | 109 | |
110 | 110 | // If it is not a sub-section array, skip. |
111 | - if ( ! $this->isNumericInteger( $_isIndexOrFieldID ) ) { |
|
111 | + if ( ! $this->isNumericInteger( $_isIndexOrFieldID ) ) { |
|
112 | 112 | continue; |
113 | 113 | } |
114 | 114 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | /** |
44 | 44 | * Stores the section definition. |
45 | 45 | */ |
46 | - public $aSection = array(); |
|
46 | + public $aSection = array(); |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * Indicates the sub section index. |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | |
92 | 92 | $_aSection[ '_is_collapsible' ] = $_aSection[ 'collapsible' ] && 'section' === $_aSection[ 'collapsible' ][ 'container' ]; |
93 | 93 | |
94 | - $_aSection[ '_tag_id' ] = 'section-' . $_aSection[ 'section_id' ] . '__' . $this->iIndex; |
|
95 | - $_aSection[ '_tag_id_model' ] = 'section-' . $_aSection[ 'section_id' ] . '__' . '___i___'; |
|
94 | + $_aSection[ '_tag_id' ] = 'section-'.$_aSection[ 'section_id' ].'__'.$this->iIndex; |
|
95 | + $_aSection[ '_tag_id_model' ] = 'section-'.$_aSection[ 'section_id' ].'__'.'___i___'; |
|
96 | 96 | |
97 | 97 | return $_aSection; |
98 | 98 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | foreach( $aSectionsetsToParse as $_sSectionPath => $_aSectionset ) { |
85 | 85 | |
86 | 86 | // The '_default' section can be empty so do not check `if ( empty( $_aSectionset ) )` here. |
87 | - if ( ! is_array( $_aSectionset ) ) { |
|
87 | + if ( ! is_array( $_aSectionset ) ) { |
|
88 | 88 | continue; |
89 | 89 | } |
90 | 90 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $this->aCallbacks[ 'sectionset_before_output' ], |
104 | 104 | array( $_aSectionsetFormatter->get() ) |
105 | 105 | ); |
106 | - if ( empty( $_aSectionset ) ) { |
|
106 | + if ( empty( $_aSectionset ) ) { |
|
107 | 107 | continue; |
108 | 108 | } |
109 | 109 |
@@ -64,9 +64,9 @@ discard block |
||
64 | 64 | } |
65 | 65 | |
66 | 66 | $_aSectionsets = $this->_getSectionsetsFormatted( |
67 | - array(), // section-sets array to modify - new formatted items will be stored here |
|
68 | - $this->aSectionsets, // parsing section-sets |
|
69 | - array(), // section path - empty for root |
|
67 | + array(), // section-sets array to modify - new formatted items will be stored here |
|
68 | + $this->aSectionsets, // parsing section-sets |
|
69 | + array(), // section path - empty for root |
|
70 | 70 | $this->sCapability // capability |
71 | 71 | ); |
72 | 72 | |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | */ |
84 | 84 | private function _getSectionsetsFormatted( $_aNewSectionsets, $aSectionsetsToParse, $aSectionPath, $sCapability ) { |
85 | 85 | |
86 | - foreach( $aSectionsetsToParse as $_sSectionPath => $_aSectionset ) { |
|
86 | + foreach ( $aSectionsetsToParse as $_sSectionPath => $_aSectionset ) { |
|
87 | 87 | |
88 | 88 | // The '_default' section can be empty so do not check `if ( empty( $_aSectionset ) )` here. |
89 | - if ( ! is_array( $_aSectionset ) ) { |
|
89 | + if ( !is_array( $_aSectionset ) ) { |
|
90 | 90 | continue; |
91 | 91 | } |
92 | 92 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | // 3.7.0+ For nested sections |
119 | 119 | $_aNewSectionsets = $this->_getNestedSections( |
120 | - $_aNewSectionsets, // sectionset array to modify |
|
120 | + $_aNewSectionsets, // sectionset array to modify |
|
121 | 121 | $_aSectionset, |
122 | 122 | $_aSectionPath, // section path |
123 | 123 | $_aSectionset[ 'capability' ] |
@@ -134,15 +134,15 @@ discard block |
||
134 | 134 | */ |
135 | 135 | private function _getNestedSections( $aSectionsetsToEdit, $aSectionset, $aSectionPath, $sCapability ) { |
136 | 136 | |
137 | - if ( ! $this->_hasNestedSections( $aSectionset ) ) { |
|
137 | + if ( !$this->_hasNestedSections( $aSectionset ) ) { |
|
138 | 138 | return $aSectionsetsToEdit; |
139 | 139 | } |
140 | 140 | |
141 | 141 | // Recursive call |
142 | 142 | return $this->_getSectionsetsFormatted( |
143 | - $aSectionsetsToEdit, // section-sets array to modify - new formatted items will be stored here |
|
144 | - $aSectionset[ 'content' ], // parsing section-sets |
|
145 | - $aSectionPath, // section path - empty for root |
|
143 | + $aSectionsetsToEdit, // section-sets array to modify - new formatted items will be stored here |
|
144 | + $aSectionset[ 'content' ], // parsing section-sets |
|
145 | + $aSectionPath, // section path - empty for root |
|
146 | 146 | $sCapability // capability |
147 | 147 | ); |
148 | 148 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | private function _hasNestedSections( $aSectionset ) { |
156 | 156 | |
157 | 157 | $aSectionset = $aSectionset + array( 'content' => null ); |
158 | - if ( ! is_array( $aSectionset[ 'content' ] ) ) { |
|
158 | + if ( !is_array( $aSectionset[ 'content' ] ) ) { |
|
159 | 159 | return false; |
160 | 160 | } |
161 | 161 | $_aContents = $aSectionset[ 'content' ]; |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * @return array The formatted definition array. |
41 | 41 | */ |
42 | 42 | public function get() { |
43 | - foreach( $this->aDimensionalKeys as $_sFlatFieldAddress ) { |
|
43 | + foreach ( $this->aDimensionalKeys as $_sFlatFieldAddress ) { |
|
44 | 44 | $this->unsetDimensionalArrayElement( |
45 | 45 | $this->aSubject, |
46 | 46 | explode( '|', $_sFlatFieldAddress ) |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $this->unsetDimensionalArrayElement( |
45 | 45 | $this->aSubject, |
46 | 46 | explode( '|', $_sFlatFieldAddress ) |
47 | - ); |
|
47 | + ); |
|
48 | 48 | } |
49 | 49 | return $this->aSubject; |
50 | 50 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $this->aInput, |
30 | 30 | $this->aFieldAddresses, |
31 | 31 | ); |
32 | - $this->aInput = $_aParameters[ 0 ]; |
|
32 | + $this->aInput = $_aParameters[ 0 ]; |
|
33 | 33 | $this->aFieldAddresses = $_aParameters[ 1 ]; |
34 | 34 | |
35 | 35 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function get() { |
44 | 44 | |
45 | - foreach( $this->_getFormattedDimensionalKeys( $this->aFieldAddresses ) as $_sFlatFieldAddress ) { |
|
45 | + foreach ( $this->_getFormattedDimensionalKeys( $this->aFieldAddresses ) as $_sFlatFieldAddress ) { |
|
46 | 46 | |
47 | 47 | $_aDimensionalKeys = explode( '|', $_sFlatFieldAddress ); |
48 | 48 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | // If the retrieved value does not exist, null will be given. |
55 | 55 | // This occurs with page meta boxes. |
56 | - if ( ! is_array( $_aDynamicElements ) ) { |
|
56 | + if ( !is_array( $_aDynamicElements ) ) { |
|
57 | 57 | continue; |
58 | 58 | } |
59 | 59 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | class AdminPageFramework_Form_Model___DefaultValues extends AdminPageFramework_Form_Base { |
19 | 19 | |
20 | - public $aFieldsets = array(); |
|
20 | + public $aFieldsets = array(); |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Sets up hooks. |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $_aParameters = func_get_args() + array( |
29 | 29 | $this->aFieldsets, |
30 | 30 | ); |
31 | - $this->aFieldsets = $_aParameters[ 0 ]; |
|
31 | + $this->aFieldsets = $_aParameters[ 0 ]; |
|
32 | 32 | |
33 | 33 | } |
34 | 34 | |
@@ -86,13 +86,13 @@ discard block |
||
86 | 86 | */ |
87 | 87 | private function _getDefaultValues( $aFieldsets, $aDefaultOptions ) { |
88 | 88 | |
89 | - foreach( $aFieldsets as $_sSectionPath => $_aItems ) { |
|
89 | + foreach ( $aFieldsets as $_sSectionPath => $_aItems ) { |
|
90 | 90 | |
91 | 91 | $_aSectionPath = explode( '|', $_sSectionPath ); |
92 | - foreach( $_aItems as $_sFieldPath => $_aFieldset ) { |
|
92 | + foreach ( $_aItems as $_sFieldPath => $_aFieldset ) { |
|
93 | 93 | $_aFieldPath = explode( '|', $_sFieldPath ); |
94 | 94 | $this->setMultiDimensionalArray( |
95 | - $aDefaultOptions, // by reference |
|
95 | + $aDefaultOptions, // by reference |
|
96 | 96 | '_default' === $_sSectionPath |
97 | 97 | ? array( $_sFieldPath ) |
98 | 98 | : array_merge( $_aSectionPath, $_aFieldPath ), // key address |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | // If there are no sub-fields |
149 | 149 | if ( count( $_aSubFields ) == 0 ) { |
150 | 150 | return $this->getElement( |
151 | - $aFieldset, // subject |
|
152 | - 'value', // key |
|
151 | + $aFieldset, // subject |
|
152 | + 'value', // key |
|
153 | 153 | $this->getElement( // default value |
154 | - $aFieldset, // subject |
|
155 | - 'default', // key |
|
154 | + $aFieldset, // subject |
|
155 | + 'default', // key |
|
156 | 156 | null // default value |
157 | 157 | ) |
158 | 158 | ); |
@@ -161,13 +161,13 @@ discard block |
||
161 | 161 | // Otherwise, there are sub-fields |
162 | 162 | $_aDefault = array(); |
163 | 163 | array_unshift( $_aSubFields, $aFieldset ); // insert the main field into the very first index. |
164 | - foreach( $_aSubFields as $_iIndex => $_aField ) { |
|
164 | + foreach ( $_aSubFields as $_iIndex => $_aField ) { |
|
165 | 165 | $_aDefault[ $_iIndex ] = $this->getElement( |
166 | - $_aField, // subject |
|
167 | - 'value', // key |
|
166 | + $_aField, // subject |
|
167 | + 'value', // key |
|
168 | 168 | $this->getElement( // default value |
169 | - $_aField, // subject |
|
170 | - 'default', // key |
|
169 | + $_aField, // subject |
|
170 | + 'default', // key |
|
171 | 171 | null // default value |
172 | 172 | ) |
173 | 173 | ); |