@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * Only one depth at a time will be parsed. |
26 | 26 | */ |
27 | - public $iNestedDepth = 0; |
|
27 | + public $iNestedDepth = 0; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Stores the generated section tab slugs. |
@@ -120,11 +120,11 @@ discard block |
||
120 | 120 | $_aFieldsBySectionTab = array(); |
121 | 121 | $_iIndex = 0; |
122 | 122 | |
123 | - foreach( $aSectionsets as $_sSectionPath => $_aSectionset ) { |
|
123 | + foreach ( $aSectionsets as $_sSectionPath => $_aSectionset ) { |
|
124 | 124 | |
125 | 125 | // If no fields for the section, no need to add the section |
126 | 126 | // unless the custom sectionset output is defined. |
127 | - if ( ! isset( $aFieldsets[ $_sSectionPath ] ) && ! $this->_isCustomContentSet( $_aSectionset ) ) { |
|
127 | + if ( !isset( $aFieldsets[ $_sSectionPath ] ) && !$this->_isCustomContentSet( $_aSectionset ) ) { |
|
128 | 128 | continue; |
129 | 129 | } |
130 | 130 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $_sSectionTaqbSlug = $this->getAOrB( |
137 | 137 | $_aSectionset[ 'section_tab_slug' ], |
138 | 138 | $_aSectionset[ 'section_tab_slug' ], |
139 | - '_default_' . $this->iNestedDepth . '_' . ( ++$_iIndex ) |
|
139 | + '_default_'.$this->iNestedDepth.'_'.( ++$_iIndex ) |
|
140 | 140 | ); |
141 | 141 | $_aSectionsBySectionTab[ $_sSectionTaqbSlug ][ $_sSectionPath ] = $_aSectionset; |
142 | 142 | $_aFieldsBySectionTab[ $_sSectionTaqbSlug ][ $_sSectionPath ] = $this->getElement( |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * @since DEVVER Moved from `AdminPageFramework_FormPart_Table`. |
158 | 158 | * @return boolean True if a custom content value is set. |
159 | 159 | */ |
160 | - private function _isCustomContentSet( array $aSectionset, array $aKeys=array( 'content' ) ) { |
|
160 | + private function _isCustomContentSet( array $aSectionset, array $aKeys = array( 'content' ) ) { |
|
161 | 161 | return isset( $aSectionset[ 'content' ] ); |
162 | 162 | // @deprecated |
163 | 163 | // foreach( $aKeys as $_sKey ) { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | * @internal |
18 | 18 | * @extends AdminPageFramework_FrameworkUtility |
19 | 19 | */ |
20 | -class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility { |
|
20 | +class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility { |
|
21 | 21 | |
22 | 22 | public $sStructureType = ''; |
23 | 23 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | */ |
20 | 20 | class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility { |
21 | 21 | |
22 | - public $sStructureType = ''; |
|
22 | + public $sStructureType = ''; |
|
23 | 23 | |
24 | 24 | /** |
25 | 25 | * @since 3.8.5 |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function get() { |
59 | 59 | |
60 | - if ( ! $this->_shouldProceed() ) { |
|
60 | + if ( !$this->_shouldProceed() ) { |
|
61 | 61 | return ''; |
62 | 62 | } |
63 | 63 | |
64 | 64 | return "<div class='admin-page-framework-info'>" |
65 | - . $this->oMsg->get( 'debug_info' ) . ': ' |
|
65 | + . $this->oMsg->get( 'debug_info' ).': ' |
|
66 | 66 | . $this->getFrameworkNameVersion() |
67 | 67 | . "</div>"; |
68 | 68 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | private function _shouldProceed() { |
75 | 75 | |
76 | - if ( ! $this->callBack( $this->aCallbacks[ 'show_debug_info' ], true ) ) { |
|
76 | + if ( !$this->callBack( $this->aCallbacks[ 'show_debug_info' ], true ) ) { |
|
77 | 77 | return false; |
78 | 78 | } |
79 | 79 | // For the generic admin pages, do no show debug information for each section. |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @param object $oForm |
30 | 30 | * @param string $sHeadActionHook The action hook triggered inside the `<head>` tag. For front-end forms, use `wp_head`. |
31 | 31 | */ |
32 | - public function __construct( $oForm, $sHeadActionHook='admin_head' ) { |
|
32 | + public function __construct( $oForm, $sHeadActionHook = 'admin_head' ) { |
|
33 | 33 | |
34 | 34 | $this->oForm = $oForm; |
35 | 35 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * as multiple instances of the factory class is loaded among separate pages, |
54 | 54 | * one gets denied here and if it can load earlier than the one which should insert the below script. |
55 | 55 | */ |
56 | - if ( ! $this->oForm->isInThePage() ) { |
|
56 | + if ( !$this->oForm->isInThePage() ) { |
|
57 | 57 | return; |
58 | 58 | } |
59 | 59 | |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | private function _getScripts_RequiredInHead() { |
77 | 77 | return 'document.write( "<style class=\'admin-page-framework-js-embedded-inline-style\'>' |
78 | 78 | . str_replace( |
79 | - '\\n', // search |
|
80 | - '', // replace |
|
79 | + '\\n', // search |
|
80 | + '', // replace |
|
81 | 81 | esc_js( $this->_getInlineCSS() ) // subject |
82 | 82 | ) |
83 | 83 | . '</style>" );'; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | $this->oForm = $oForm; |
35 | 35 | |
36 | - if ( in_array( $this->oForm->aArguments[ 'structure_type' ], array( 'widget' ) ) ) { |
|
36 | + if ( in_array( $this->oForm->aArguments[ 'structure_type' ], array( 'widget' ) ) ) { |
|
37 | 37 | return; |
38 | 38 | } |
39 | 39 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * @return string |
98 | 98 | * @since DEVVER |
99 | 99 | */ |
100 | - private function _getScriptElementConcealerCSSRules() { |
|
100 | + private function _getScriptElementConcealerCSSRules() { |
|
101 | 101 | |
102 | 102 | // Avoid hiding framework forms in widgets. In some cases, the user sets a form in any page, |
103 | 103 | // which causes a different structure form type including `admin_page` gets loaded even in widgets.php (or any page builder pages dealing with widgets) |
@@ -40,7 +40,7 @@ |
||
40 | 40 | // Widgets can be called multiple times for the number of user-created widget instances for one class instance |
41 | 41 | // so make sure it is processed only once per page. |
42 | 42 | if ( $this->hasBeenCalled( 'resource_' . $oForm->aArguments[ 'caller_id' ] ) ) { |
43 | - return; |
|
43 | + return; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | $this->_setHooks(); |
@@ -230,7 +230,7 @@ |
||
230 | 230 | ); |
231 | 231 | |
232 | 232 | $_sID = $this->sanitizeSlug( strtolower( $this->oForm->aArguments[ 'caller_id' ] ) ); |
233 | - if ( $_sCSSRules ) { |
|
233 | + if ( $_sCSSRules ) { |
|
234 | 234 | echo "<style type='text/css' id='inline-style-{$_sID}' class='admin-page-framework-form-style'>" |
235 | 235 | . $_sCSSRules |
236 | 236 | . "</style>"; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | // Widgets can be called multiple times for the number of user-created widget instances for one class instance |
42 | 42 | // so make sure it is processed only once per page. |
43 | - if ( $this->hasBeenCalled( 'resource_' . $oForm->aArguments[ 'caller_id' ] ) ) { |
|
43 | + if ( $this->hasBeenCalled( 'resource_'.$oForm->aArguments[ 'caller_id' ] ) ) { |
|
44 | 44 | return; |
45 | 45 | } |
46 | 46 | |
@@ -113,12 +113,12 @@ discard block |
||
113 | 113 | * @since 3.7.0 |
114 | 114 | */ |
115 | 115 | public function _replyToEnqueueScripts() { |
116 | - if ( ! $this->oForm->isInThePage() ) { |
|
116 | + if ( !$this->oForm->isInThePage() ) { |
|
117 | 117 | return; |
118 | 118 | } |
119 | - foreach( $this->oForm->getResources( 'src_scripts' ) as $_isIndex => $_asEnqueue ) { |
|
119 | + foreach ( $this->oForm->getResources( 'src_scripts' ) as $_isIndex => $_asEnqueue ) { |
|
120 | 120 | $this->_enqueueScript( $_asEnqueue ); |
121 | - $this->oForm->unsetResources( array( 'src_scripts', $_isIndex ) ); // no longer needed |
|
121 | + $this->oForm->unsetResources( array( 'src_scripts', $_isIndex ) ); // no longer needed |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | /** |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | private function _getFormattedEnqueueScript( $asEnqueue ) { |
166 | 166 | static $_iCallCount = 1; |
167 | 167 | $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array( |
168 | - 'handle_id' => 'script_form_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount, |
|
168 | + 'handle_id' => 'script_form_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount, |
|
169 | 169 | 'src' => null, |
170 | 170 | 'dependencies' => null, |
171 | 171 | 'version' => null, |
@@ -188,10 +188,10 @@ discard block |
||
188 | 188 | */ |
189 | 189 | public function _replyToEnqueueStyles() { |
190 | 190 | |
191 | - if ( ! $this->oForm->isInThePage() ) { |
|
191 | + if ( !$this->oForm->isInThePage() ) { |
|
192 | 192 | return; |
193 | 193 | } |
194 | - foreach( $this->oForm->getResources( 'src_styles' ) as $_isIndex => $_asEnqueueItem ) { |
|
194 | + foreach ( $this->oForm->getResources( 'src_styles' ) as $_isIndex => $_asEnqueueItem ) { |
|
195 | 195 | $this->_enqueueStyle( $_asEnqueueItem ); |
196 | 196 | $this->oForm->unsetResources( array( 'src_styles', $_isIndex ) ); // no longer needed |
197 | 197 | } |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | private function _getFormattedEnqueueStyle( $asEnqueue ) { |
214 | 214 | static $_iCallCount = 1; |
215 | 215 | $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array( |
216 | - 'handle_id' => 'style_form_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount, |
|
216 | + 'handle_id' => 'style_form_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount, |
|
217 | 217 | 'src' => null, |
218 | 218 | 'dependencies' => null, |
219 | 219 | 'version' => null, |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | public function _replyToAddStyle() { |
239 | 239 | |
240 | - if ( ! $this->oForm->isInThePage() ) { |
|
240 | + if ( !$this->oForm->isInThePage() ) { |
|
241 | 241 | return; |
242 | 242 | } |
243 | 243 | $_sCSSRules = $this->_getFormattedInternalStyles( |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | */ |
280 | 280 | public function _replyToAddScript() { |
281 | 281 | |
282 | - if ( ! $this->oForm->isInThePage() ) { |
|
282 | + if ( !$this->oForm->isInThePage() ) { |
|
283 | 283 | return; |
284 | 284 | } |
285 | 285 |
@@ -139,7 +139,7 @@ |
||
139 | 139 | */ |
140 | 140 | private function _getUnsetFlagFieldInputTag( array $aField ) { |
141 | 141 | |
142 | - if ( false !== $aField[ 'save' ] ) { |
|
142 | + if ( false !== $aField[ 'save' ] ) { |
|
143 | 143 | return ''; |
144 | 144 | } |
145 | 145 | return $this->getHTMLTag( |
@@ -324,6 +324,7 @@ discard block |
||
324 | 324 | * Retrieves a field output. |
325 | 325 | * |
326 | 326 | * @since 3.8.0 |
327 | + * @param boolean $bIsLastElement |
|
327 | 328 | * @return string |
328 | 329 | */ |
329 | 330 | private function _getFieldOutput( $sContent, array $aField, $bIsLastElement ) { |
@@ -402,6 +403,7 @@ discard block |
||
402 | 403 | * Returns the final fields output. |
403 | 404 | * |
404 | 405 | * @since 3.1.0 |
406 | + * @param integer $iFieldsCount |
|
405 | 407 | * @return string |
406 | 408 | */ |
407 | 409 | private function _getFinalOutput( array $aFieldset, array $aFieldsOutput, $iFieldsCount ) { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $this->aFieldset[ '_field_path_array' ], |
39 | 39 | $this->aFieldset[ 'error_message' ] |
40 | 40 | ); |
41 | - $_aOutputs[] = $_oFieldError->get(); |
|
41 | + $_aOutputs[ ] = $_oFieldError->get(); |
|
42 | 42 | |
43 | 43 | // 2. Construct fields array for sub-fields. |
44 | 44 | $_oFieldsFormatter = new AdminPageFramework_Form_Model___Format_Fields( |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $_aFields = $_oFieldsFormatter->get(); |
49 | 49 | |
50 | 50 | // 3. Get the field and its sub-fields output. |
51 | - $_aOutputs[] = $this->_getFieldsOutput( |
|
51 | + $_aOutputs[ ] = $this->_getFieldsOutput( |
|
52 | 52 | $this->aFieldset, |
53 | 53 | $_aFields, |
54 | 54 | $this->aCallbacks |
@@ -71,11 +71,11 @@ discard block |
||
71 | 71 | * @since 3.8.0 Added the `$aFieldset` parameter |
72 | 72 | * @return string |
73 | 73 | */ |
74 | - private function _getFieldsOutput( $aFieldset, array $aFields, array $aCallbacks=array() ) { |
|
74 | + private function _getFieldsOutput( $aFieldset, array $aFields, array $aCallbacks = array() ) { |
|
75 | 75 | |
76 | 76 | $_aOutput = array(); |
77 | - foreach( $aFields as $_isIndex => $_aField ) { |
|
78 | - $_aOutput[] = $this->_getEachFieldOutput( |
|
77 | + foreach ( $aFields as $_isIndex => $_aField ) { |
|
78 | + $_aOutput[ ] = $this->_getEachFieldOutput( |
|
79 | 79 | $_aField, |
80 | 80 | $_isIndex, |
81 | 81 | $aCallbacks, |
@@ -94,11 +94,11 @@ discard block |
||
94 | 94 | * @since 3.5.3 |
95 | 95 | * @return string the HTML output of the given field. |
96 | 96 | */ |
97 | - private function _getEachFieldOutput( $aField, $isIndex, array $aCallbacks, $bIsLastElement=false ) { |
|
97 | + private function _getEachFieldOutput( $aField, $isIndex, array $aCallbacks, $bIsLastElement = false ) { |
|
98 | 98 | |
99 | 99 | // Field type definition - allows mixed field types in sub-fields |
100 | 100 | $_aFieldTypeDefinition = $this->_getFieldTypeDefinition( $aField[ 'type' ] ); |
101 | - if ( ! is_callable( $_aFieldTypeDefinition[ 'hfRenderField' ] ) ) { |
|
101 | + if ( !is_callable( $_aFieldTypeDefinition[ 'hfRenderField' ] ) ) { |
|
102 | 102 | return ''; |
103 | 103 | } |
104 | 104 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | private function _getFieldOutput( $sContent, $aField, $bIsLastElement ) { |
133 | 133 | $_oFieldAttribute = new AdminPageFramework_Form_View___Attribute_Field( $aField ); |
134 | 134 | return $aField[ 'before_field' ] |
135 | - . "<div " . $_oFieldAttribute->get() . ">" |
|
135 | + . "<div ".$_oFieldAttribute->get().">" |
|
136 | 136 | . $sContent |
137 | 137 | . $this->_getUnsetFlagFieldInputTag( $aField ) |
138 | 138 | . $this->_getDelimiter( $aField, $bIsLastElement ) |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | 'input', |
155 | 155 | array( |
156 | 156 | 'type' => 'hidden', |
157 | - 'name' => '__unset_' . $aField[ '_fields_type' ] . '[' . $aField[ '_input_name_flat' ] . ']', |
|
157 | + 'name' => '__unset_'.$aField[ '_fields_type' ].'['.$aField[ '_input_name_flat' ].']', |
|
158 | 158 | 'value' => $aField[ '_input_name_flat' ], |
159 | 159 | 'class' => 'unset-element-names element-address', |
160 | 160 | ) |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | */ |
186 | 186 | private function _getDelimiter( $aField, $bIsLastElement ) { |
187 | 187 | return $aField[ 'delimiter' ] |
188 | - ? "<div " . $this->getAttributes( |
|
188 | + ? "<div ".$this->getAttributes( |
|
189 | 189 | array( |
190 | 190 | 'class' => 'delimiter', |
191 | 191 | 'id' => "delimiter-{$aField[ 'input_id' ]}", |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | "" |
196 | 196 | ), |
197 | 197 | ) |
198 | - ) . ">" |
|
198 | + ).">" |
|
199 | 199 | . $aField[ 'delimiter' ] |
200 | 200 | . "</div>" |
201 | 201 | : ''; |
@@ -209,9 +209,9 @@ discard block |
||
209 | 209 | */ |
210 | 210 | private function _getFinalOutput( $aFieldset, array $aFieldsOutput, $iFieldsCount ) { |
211 | 211 | |
212 | - $_oFieldsetAttributes = new AdminPageFramework_Form_View___Attribute_Fieldset( $aFieldset ); |
|
212 | + $_oFieldsetAttributes = new AdminPageFramework_Form_View___Attribute_Fieldset( $aFieldset ); |
|
213 | 213 | return $aFieldset[ 'before_fieldset' ] |
214 | - . "<fieldset " . $_oFieldsetAttributes->get() . ">" |
|
214 | + . "<fieldset ".$_oFieldsetAttributes->get().">" |
|
215 | 215 | . $this->_getEmbeddedFieldTitle( $aFieldset ) |
216 | 216 | . $this->_getChildFieldTitle( $aFieldset ) |
217 | 217 | . $this->_getFieldsetContent( $aFieldset, $aFieldsOutput, $iFieldsCount ) |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | */ |
229 | 229 | private function _getEmbeddedFieldTitle( $aFieldset ) { |
230 | 230 | |
231 | - if ( ! $aFieldset[ '_is_title_embedded' ] ) { |
|
231 | + if ( !$aFieldset[ '_is_title_embedded' ] ) { |
|
232 | 232 | return ''; |
233 | 233 | } |
234 | 234 | |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | */ |
254 | 254 | private function _getChildFieldTitle( $aFieldset ) { |
255 | 255 | |
256 | - if ( ! $aFieldset[ '_nested_depth' ] ) { |
|
256 | + if ( !$aFieldset[ '_nested_depth' ] ) { |
|
257 | 257 | return ''; |
258 | 258 | } |
259 | 259 | if ( $aFieldset[ '_is_title_embedded' ] ) { |
@@ -282,12 +282,12 @@ discard block |
||
282 | 282 | return $aFieldset[ 'content' ]; |
283 | 283 | } |
284 | 284 | |
285 | - $_oFieldsAttributes = new AdminPageFramework_Form_View___Attribute_Fields( |
|
285 | + $_oFieldsAttributes = new AdminPageFramework_Form_View___Attribute_Fields( |
|
286 | 286 | $aFieldset, |
287 | - array(), // attribute array |
|
287 | + array(), // attribute array |
|
288 | 288 | $iFieldsCount |
289 | 289 | ); |
290 | - return "<div " . $_oFieldsAttributes->get() . ">" |
|
290 | + return "<div ".$_oFieldsAttributes->get().">" |
|
291 | 291 | . $aFieldset[ 'before_fields' ] |
292 | 292 | . implode( PHP_EOL, $aFieldsOutput ) |
293 | 293 | . $aFieldset[ 'after_fields' ] |
@@ -310,13 +310,13 @@ discard block |
||
310 | 310 | $aField[ 'description' ], |
311 | 311 | 'admin-page-framework-fields-description' // class selector |
312 | 312 | ); |
313 | - $_aOutput[] = $_oFieldDescription->get(); |
|
313 | + $_aOutput[ ] = $_oFieldDescription->get(); |
|
314 | 314 | |
315 | 315 | // Dimensional keys of repeatable and sortable fields |
316 | - $_aOutput[] = $this->_getDynamicElementFlagFieldInputTag( $aField ); |
|
316 | + $_aOutput[ ] = $this->_getDynamicElementFlagFieldInputTag( $aField ); |
|
317 | 317 | |
318 | 318 | // Repeatable and sortable scripts |
319 | - $_aOutput[] = $this->_getFieldScripts( $aField, $iFieldsCount ); |
|
319 | + $_aOutput[ ] = $this->_getFieldScripts( $aField, $iFieldsCount ); |
|
320 | 320 | |
321 | 321 | return implode( PHP_EOL, array_filter( $_aOutput ) ); |
322 | 322 | |
@@ -328,10 +328,10 @@ discard block |
||
328 | 328 | */ |
329 | 329 | private function _getDynamicElementFlagFieldInputTag( $aFieldset ) { |
330 | 330 | |
331 | - if ( ! empty( $aFieldset[ 'repeatable' ] ) ) { |
|
331 | + if ( !empty( $aFieldset[ 'repeatable' ] ) ) { |
|
332 | 332 | return $this->_getRepeatableFieldFlagTag( $aFieldset ); |
333 | 333 | } |
334 | - if ( ! empty( $aFieldset[ 'sortable' ] ) ) { |
|
334 | + if ( !empty( $aFieldset[ 'sortable' ] ) ) { |
|
335 | 335 | return $this->_getSortableFieldFlagTag( $aFieldset ); |
336 | 336 | } |
337 | 337 | return ''; |
@@ -346,8 +346,8 @@ discard block |
||
346 | 346 | 'input', |
347 | 347 | array( |
348 | 348 | 'type' => 'hidden', |
349 | - 'name' => '__repeatable_elements_' . $aFieldset[ '_structure_type' ] |
|
350 | - . '[' . $aFieldset[ '_field_address' ] . ']', |
|
349 | + 'name' => '__repeatable_elements_'.$aFieldset[ '_structure_type' ] |
|
350 | + . '['.$aFieldset[ '_field_address' ].']', |
|
351 | 351 | 'class' => 'element-address', |
352 | 352 | 'value' => $aFieldset[ '_field_address' ], |
353 | 353 | 'data-field_address_model' => $aFieldset[ '_field_address_model' ], |
@@ -363,8 +363,8 @@ discard block |
||
363 | 363 | 'input', |
364 | 364 | array( |
365 | 365 | 'type' => 'hidden', |
366 | - 'name' => '__sortable_elements_' . $aFieldset[ '_structure_type' ] |
|
367 | - . '[' . $aFieldset[ '_field_address' ] . ']', |
|
366 | + 'name' => '__sortable_elements_'.$aFieldset[ '_structure_type' ] |
|
367 | + . '['.$aFieldset[ '_field_address' ].']', |
|
368 | 368 | 'class' => 'element-address', |
369 | 369 | 'value' => $aFieldset[ '_field_address' ], |
370 | 370 | 'data-field_address_model' => $aFieldset[ '_field_address_model' ], |
@@ -383,14 +383,14 @@ discard block |
||
383 | 383 | $_aOutput = array(); |
384 | 384 | |
385 | 385 | // Add the repeater script |
386 | - $_aOutput[] = ! empty( $aField[ 'repeatable' ] ) |
|
387 | - ? $this->_getRepeaterFieldEnablerScript( 'fields-' . $aField[ 'tag_id' ], $iFieldsCount, $aField[ 'repeatable' ] ) |
|
386 | + $_aOutput[ ] = !empty( $aField[ 'repeatable' ] ) |
|
387 | + ? $this->_getRepeaterFieldEnablerScript( 'fields-'.$aField[ 'tag_id' ], $iFieldsCount, $aField[ 'repeatable' ] ) |
|
388 | 388 | : ''; |
389 | 389 | |
390 | 390 | // Add the sortable script - if the number of fields is only one, no need to sort the field. |
391 | 391 | // Repeatable fields can make the number increase so here it checks the repeatability. |
392 | - $_aOutput[] = ! empty( $aField[ 'sortable' ] ) && ( $iFieldsCount > 1 || ! empty( $aField[ 'repeatable' ] ) ) |
|
393 | - ? $this->_getSortableFieldEnablerScript( 'fields-' . $aField[ 'tag_id' ] ) |
|
392 | + $_aOutput[ ] = !empty( $aField[ 'sortable' ] ) && ( $iFieldsCount > 1 || !empty( $aField[ 'repeatable' ] ) ) |
|
393 | + ? $this->_getSortableFieldEnablerScript( 'fields-'.$aField[ 'tag_id' ] ) |
|
394 | 394 | : ''; |
395 | 395 | |
396 | 396 | return implode( PHP_EOL, $_aOutput ); |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | */ |
28 | 28 | protected function _getAttributes() { |
29 | 29 | |
30 | - $_aSectionAttributes = $this->uniteArrays( |
|
31 | - $this->dropElementsByType( $this->aArguments[ 'attributes' ] ), // remove elements of an array. |
|
30 | + $_aSectionAttributes = $this->uniteArrays( |
|
31 | + $this->dropElementsByType( $this->aArguments[ 'attributes' ] ), // remove elements of an array. |
|
32 | 32 | array( |
33 | 33 | 'id' => $this->aArguments[ '_tag_id' ], // section-{section id}__{index} |
34 | 34 | 'class' => $this->getClassAttribute( |
@@ -49,19 +49,19 @@ discard block |
||
49 | 49 | ) |
50 | 50 | ); |
51 | 51 | |
52 | - $_aSectionAttributes[ 'class' ] = $this->getClassAttribute( |
|
52 | + $_aSectionAttributes[ 'class' ] = $this->getClassAttribute( |
|
53 | 53 | $_aSectionAttributes[ 'class' ], |
54 | 54 | $this->dropElementsByType( $this->aArguments[ 'class' ] ) |
55 | - ); // 3.3.1+ |
|
55 | + ); // 3.3.1+ |
|
56 | 56 | |
57 | - $_aSectionAttributes[ 'style' ] = $this->getStyleAttribute( |
|
57 | + $_aSectionAttributes[ 'style' ] = $this->getStyleAttribute( |
|
58 | 58 | $_aSectionAttributes[ 'style' ], |
59 | 59 | $this->getAOrB( |
60 | 60 | $this->aArguments[ 'hidden' ], |
61 | 61 | 'display:none', |
62 | 62 | null |
63 | 63 | ) |
64 | - ); // 3.3.1+ |
|
64 | + ); // 3.3.1+ |
|
65 | 65 | |
66 | 66 | return $_aSectionAttributes; |
67 | 67 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $this->aAttributes + $this->_getAttributes() |
33 | 33 | ); |
34 | 34 | |
35 | - $_aAttributes[ 'class' ] = $this->getClassAttribute( |
|
35 | + $_aAttributes[ 'class' ] = $this->getClassAttribute( |
|
36 | 36 | $this->getElement( $_aAttributes, 'class', array() ), |
37 | 37 | $this->getElement( $this->aArguments, array( 'class', $this->sContext ), array() ) |
38 | 38 | ); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | class AdminPageFramework_Form_View___Attribute_SectionTableBody extends AdminPageFramework_Form_View___Attribute_Base { |
19 | 19 | |
20 | - public $sContext = 'section_table_content'; |
|
20 | + public $sContext = 'section_table_content'; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Returns an attribute array. |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | return array( |
36 | 36 | 'class' => $this->getAOrB( |
37 | 37 | $this->aArguments[ '_is_collapsible' ], |
38 | - 'admin-page-framework-collapsible-section-content' . ' ' |
|
39 | - . 'admin-page-framework-collapsible-content' . ' ' |
|
40 | - . 'accordion-section-content' . ' ' |
|
41 | - . 'admin-page-framework-collapsible-content-type-' . $_sCollapsibleType, |
|
38 | + 'admin-page-framework-collapsible-section-content'.' ' |
|
39 | + . 'admin-page-framework-collapsible-content'.' ' |
|
40 | + . 'accordion-section-content'.' ' |
|
41 | + . 'admin-page-framework-collapsible-content-type-'.$_sCollapsibleType, |
|
42 | 42 | null |
43 | 43 | ), |
44 | 44 | ); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * @since 3.6.0 |
26 | 26 | * @return array |
27 | 27 | */ |
28 | - protected function _getAttributes() { |
|
28 | + protected function _getAttributes() { |
|
29 | 29 | return array( |
30 | 30 | 'class' => $this->getAOrB( |
31 | 31 | $this->aArguments[ '_is_collapsible' ], |
@@ -61,15 +61,15 @@ discard block |
||
61 | 61 | 'class' => $this->getClassAttribute( |
62 | 62 | 'admin-page-framework-sections', |
63 | 63 | $this->getAOrB( |
64 | - ! $this->sSectionTabSlug || '_default' === $this->sSectionTabSlug, |
|
64 | + !$this->sSectionTabSlug || '_default' === $this->sSectionTabSlug, |
|
65 | 65 | null, |
66 | 66 | 'admin-page-framework-section-tabs-contents' |
67 | 67 | ), |
68 | 68 | $this->getAOrB( |
69 | 69 | empty( $this->aCollapsible ), |
70 | 70 | null, |
71 | - 'admin-page-framework-collapsible-sections-content' . ' ' |
|
72 | - . 'admin-page-framework-collapsible-content' . ' ' |
|
71 | + 'admin-page-framework-collapsible-sections-content'.' ' |
|
72 | + . 'admin-page-framework-collapsible-content'.' ' |
|
73 | 73 | . 'accordion-section-content' |
74 | 74 | |
75 | 75 | ), |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | // 3.6.0+ - dimensional section address without the option key, used by the 'save' argument and when sorting dynamic elements. |
86 | 86 | 'data-section_address' => $this->aSectionset[ 'section_id' ], |
87 | - 'data-section_address_model' => $this->aSectionset[ 'section_id' ] . '|' . '___i___', |
|
87 | + 'data-section_address_model' => $this->aSectionset[ 'section_id' ].'|'.'___i___', |
|
88 | 88 | |
89 | 89 | ) |
90 | 90 | + $this->_getDynamicElementArguments( $this->aSectionset ); |
@@ -123,12 +123,12 @@ discard block |
||
123 | 123 | return array( |
124 | 124 | // 3.6.0+ Stores the total number of dynamic elements, used to generate the input id and name of repeated sections which contain an incremented index number. |
125 | 125 | 'data-largest_index' => max( |
126 | - ( int ) $this->iSubSectionCount - 1, // zero-base index |
|
126 | + ( int ) $this->iSubSectionCount - 1, // zero-base index |
|
127 | 127 | 0 |
128 | 128 | ), // convert negative numbers to zero. |
129 | 129 | |
130 | - 'data-section_id_model' => $aSectionset[ 'section_id' ] . '__' . '___i___', |
|
131 | - 'data-flat_section_name_model' => $aSectionset[ 'section_id' ] . '|___i___', |
|
130 | + 'data-section_id_model' => $aSectionset[ 'section_id' ].'__'.'___i___', |
|
131 | + 'data-flat_section_name_model' => $aSectionset[ 'section_id' ].'|___i___', |
|
132 | 132 | // @todo apply a callback |
133 | 133 | // 'data-section_name_model' => $aSectionset[ 'section_id' ] . '[___i___]', |
134 | 134 | 'data-section_name_model' => $_oSectionNameGenerator->getModel(), |