Completed
Branch master (acc4ae)
by
unknown
03:44
created
form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @return      string
60 60
      * @since       3.7.0
61 61
      */
62
-    public function get( $bTableRow=true ) {
62
+    public function get( $bTableRow = true ) {
63 63
         
64 64
         $_sMethodName = $this->getAOrB(
65 65
             $bTableRow,
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         );
69 69
         
70 70
         $_sOutput = '';
71
-        foreach( $this->aFieldsetsPerSection as $_aFieldset ) {
71
+        foreach ( $this->aFieldsetsPerSection as $_aFieldset ) {
72 72
 
73 73
             $_oFieldsetOutputFormatter = new AdminPageFramework_Form_Model___Format_FieldsetOutput(
74 74
                 $_aFieldset, 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             );        
78 78
             
79 79
             $_aFieldset = $_oFieldsetOutputFormatter->get();
80
-            if ( ! $_aFieldset[ 'if' ] ) {
80
+            if ( !$_aFieldset[ 'if' ] ) {
81 81
                 continue;
82 82
             }
83 83
             
Please login to merge, or discard this patch.
form/_model/formatter/AdminPageFramework_Form_Model___Format_Fields.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function get() {
57 57
 
58 58
         // Get the set value(s)
59
-        $_mSavedValue    = $this->_getStoredInputFieldValue( 
59
+        $_mSavedValue = $this->_getStoredInputFieldValue( 
60 60
             $this->aField, 
61 61
             $this->aOptions 
62 62
         );
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
              * @return      void
117 117
              */
118 118
             private function _divideMainAndSubFields( $aField, array &$aFirstField, array &$aSubFields ) {
119
-                foreach( $aField as $_nsIndex => $_mFieldElement ) {
119
+                foreach ( $aField as $_nsIndex => $_mFieldElement ) {
120 120
                     if ( is_numeric( $_nsIndex ) ) {
121
-                        $aSubFields[] = $_mFieldElement;
121
+                        $aSubFields[ ] = $_mFieldElement;
122 122
                     } else {
123 123
                         $aFirstField[ $_nsIndex ] = $_mFieldElement;
124 124
                     }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                 // We are collecting elements from the second sub-field.
145 145
                 unset( $_aSavedValues[ 0 ] ); 
146 146
                    
147
-                foreach( $_aSavedValues as $_iIndex => $vValue ) {
147
+                foreach ( $_aSavedValues as $_iIndex => $vValue ) {
148 148
                     $aSubFields[ $_iIndex - 1 ] = isset( $aSubFields[ $_iIndex - 1 ] ) && is_array( $aSubFields[ $_iIndex - 1 ] )
149 149
                         ? $aSubFields[ $_iIndex - 1 ] 
150 150
                         : array();     
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
              */
160 160
             private function _fillSubFields( array &$aSubFields, array $aFirstField ) {
161 161
                         
162
-                foreach( $aSubFields as &$_aSubField ) {
162
+                foreach ( $aSubFields as &$_aSubField ) {
163 163
                     
164 164
                     // Evacuate the label element which should not be merged.
165 165
                     $_aLabel = $this->getElement( 
@@ -190,15 +190,15 @@  discard block
 block discarded – undo
190 190
          
191 191
             // Determine whether the elements are saved in an array.
192 192
             // $_bHasSubFields = count( $aFields ) > 1 || $aField[ 'repeatable' ] || $aField[ 'sortable' ];
193
-            if ( ! $this->hasSubFields( $aFields, $aField ) ) {
193
+            if ( !$this->hasSubFields( $aFields, $aField ) ) {
194 194
                 $aFields[ 0 ][ '_saved_value' ] = $mSavedValue;
195 195
                 $aFields[ 0 ][ '_is_multiple_fields' ] = false;
196 196
                 return;                    
197 197
             }
198 198
      
199
-            foreach( $aFields as $_iIndex => &$_aThisField ) {
199
+            foreach ( $aFields as $_iIndex => &$_aThisField ) {
200 200
                 $_aThisField[ '_saved_value' ]        = $this->getElement( $mSavedValue, $_iIndex, null );
201
-                $_aThisField[ '_subfield_index' ]     = $_iIndex;   // 3.8.0+
201
+                $_aThisField[ '_subfield_index' ]     = $_iIndex; // 3.8.0+
202 202
                 $_aThisField[ '_is_multiple_fields' ] = true;
203 203
             }
204 204
     
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
          * @since       3.6.0       Moved from `AdminPageFramework_FieldDefinition`.
213 213
          */
214 214
         private function _setFieldsValue( &$aFields ) {
215
-            foreach( $aFields as &$_aField ) {
215
+            foreach ( $aFields as &$_aField ) {
216 216
                 $_aField[ '_is_value_set_by_user' ] = isset( $_aField[ 'value' ] );
217 217
                 $_aField[ 'value' ]                 = $this->_getSetFieldValue( $_aField );
218 218
             }
@@ -257,10 +257,10 @@  discard block
 block discarded – undo
257 257
          */
258 258
         private function _getStoredInputFieldValue( $aField, $aOptions ) {    
259 259
 
260
-            $_aFieldPath   = $aField[ '_field_path_array' ];
260
+            $_aFieldPath = $aField[ '_field_path_array' ];
261 261
         
262 262
             // If a section is not set, check the first dimension element.
263
-            if ( ! isset( $aField[ 'section_id' ] ) || '_default' === $aField[ 'section_id' ] ) {
263
+            if ( !isset( $aField[ 'section_id' ] ) || '_default' === $aField[ 'section_id' ] ) {
264 264
                 return $this->getElement( 
265 265
                     $aOptions, 
266 266
                     $_aFieldPath, // $aField[ 'field_id' ],  // @todo this may have to be a field path instead of field id.
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -254,7 +254,7 @@
 block discarded – undo
254 254
          * @since       3.7.0       Changed the `_field_type` element to `_structure_type`.
255 255
          * @return      null|string|array
256 256
          */
257
-        private function _getStoredInputFieldValue( $aField, $aOptions ) {    
257
+        private function _getStoredInputFieldValue( $aField, $aOptions ) {
258 258
 
259 259
             $_aFieldPath   = $aField[ '_field_path_array' ];
260 260
         
Please login to merge, or discard this patch.
form/_view/attribute/AdminPageFramework_Form_View___Attribute_Fields.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             $this->aAttributes,
40 40
             $this->iFieldsCount,
41 41
         );
42
-        $this->aArguments    = $_aParameters[ 0 ];        
42
+        $this->aArguments = $_aParameters[ 0 ];        
43 43
         $this->aAttributes  = $_aParameters[ 1 ];
44 44
         $this->iFieldsCount = $_aParameters[ 2 ];
45 45
         
@@ -52,17 +52,17 @@  discard block
 block discarded – undo
52 52
      */
53 53
     protected function _getAttributes() {
54 54
         return array(
55
-            'id'            => $this->sContext . '-' . $this->aArguments[ 'tag_id' ],
56
-            'class'         => 'admin-page-framework-' . $this->sContext
57
-                . $this->getAOrB( ! empty( $this->aArguments[ 'repeatable' ] ), ' repeatable dynamic-fields', '' ) // 3.6.0+ Added the 'dynamic-fields' class selector.
58
-                . $this->getAOrB( ! empty( $this->aArguments[ 'sortable' ] ), ' sortable dynamic-fields', '' ),
55
+            'id'            => $this->sContext.'-'.$this->aArguments[ 'tag_id' ],
56
+            'class'         => 'admin-page-framework-'.$this->sContext
57
+                . $this->getAOrB( !empty( $this->aArguments[ 'repeatable' ] ), ' repeatable dynamic-fields', '' ) // 3.6.0+ Added the 'dynamic-fields' class selector.
58
+                . $this->getAOrB( !empty( $this->aArguments[ 'sortable' ] ), ' sortable dynamic-fields', '' ),
59 59
 
60 60
             // referred by the sortable field JavaScript script.
61 61
             'data-type'     => $this->aArguments[ 'type' ], 
62 62
 
63 63
             // 3.6.0+ Stores the total number of dynamic fields, used to generate the input id and name of repeated fields which contain an incremented index number.
64 64
             'data-largest_index'            => max(     
65
-                ( int ) $this->iFieldsCount - 1,  // zero-base index
65
+                ( int ) $this->iFieldsCount - 1, // zero-base index
66 66
                 0 
67 67
             ), // convert negative numbers to zero.
68 68
             
Please login to merge, or discard this patch.
_common/form/_view/fieldset/AdminPageFramework_Form_View___Fieldset.php 3 patches
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
195 195
                                         ""
196 196
                                     ),
197 197
                                 ) 
198
-                            ) . ">"
198
+                            ).">"
199 199
                                 . $aField[ 'delimiter' ]
200 200
                             . "</div>"
201 201
                         : '';
@@ -209,9 +209,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 );
Please login to merge, or discard this patch.
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -126,6 +126,7 @@  discard block
 block discarded – undo
126 126
                  * Retrieves a field output.
127 127
                  * 
128 128
                  * @since       3.8.0
129
+                 * @param boolean $bIsLastElement
129 130
                  * @return      string
130 131
                  */ 
131 132
                 private function _getFieldOutput( $sContent, $aField, $bIsLastElement ) {
@@ -204,6 +205,7 @@  discard block
 block discarded – undo
204 205
          * Returns the final fields output.
205 206
          * 
206 207
          * @since       3.1.0
208
+         * @param integer $iFieldsCount
207 209
          * @return      string
208 210
          */
209 211
         private function _getFinalOutput( $aFieldset, array $aFieldsOutput, $iFieldsCount ) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
                  */
147 147
                 private function _getUnsetFlagFieldInputTag( $aField ) {
148 148
                     
149
-                    if ( false !== $aField[ 'save' ] ) {                
149
+                    if ( false !== $aField[ 'save' ] ) {
150 150
                         return '';
151 151
                     }
152 152
                     return $this->getHTMLTag( 
Please login to merge, or discard this patch.
development/factory/_common/_abstract/_model/AdminPageFramework_Message.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
         'confirm_perform_task'                  => 'Please confirm your action.', 
83 83
         'specified_option_been_deleted'         => 'The specified options have been deleted.', 
84 84
         'nonce_verification_failed'             => 'A problem occurred while processing the form data. Please try again.', 
85
-        'check_max_input_vars'                  => 'Not all form fields could not be sent. Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. <code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s',  // 3.5.11+
86
-        'send_email'                            => 'Is it okay to send the email?',     // 3.3.0+
87
-        'email_sent'                            => 'The email has been sent.',  // 3.3.0+, 3.3.5+ deprecated 
85
+        'check_max_input_vars'                  => 'Not all form fields could not be sent. Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. <code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s', // 3.5.11+
86
+        'send_email'                            => 'Is it okay to send the email?', // 3.3.0+
87
+        'email_sent'                            => 'The email has been sent.', // 3.3.0+, 3.3.5+ deprecated 
88 88
         'email_scheduled'                       => 'The email has been scheduled.', // 3.3.5+
89
-        'email_could_not_send'                  => 'There was a problem sending the email',     // 3.3.0+
89
+        'email_could_not_send'                  => 'There was a problem sending the email', // 3.3.0+
90 90
         
91 91
         // AdminPageFramework_PostType
92 92
         'title'                                 => 'Title',     
@@ -113,14 +113,14 @@  discard block
 block discarded – undo
113 113
         'upload_file'                           => 'Upload File', 
114 114
         'use_this_file'                         => 'Use This File', 
115 115
         'select_file'                           => 'Select File', 
116
-        'remove_value'                          => 'Remove Value',  // 3.2.0+
117
-        'select_all'                            => 'Select All',    // 3.3.0+
118
-        'select_none'                           => 'Select None',   // 3.3.0+                       
116
+        'remove_value'                          => 'Remove Value', // 3.2.0+
117
+        'select_all'                            => 'Select All', // 3.3.0+
118
+        'select_none'                           => 'Select None', // 3.3.0+                       
119 119
         'no_term_found'                         => 'No term found.', // 3.3.2+
120 120
 
121 121
         // AdminPageFramework_Form_View___Script_{...}
122 122
         'select'                                => 'Select', // 3.4.2+             
123
-        'insert'                                => 'Insert',  // 3.4.2+
123
+        'insert'                                => 'Insert', // 3.4.2+
124 124
         'use_this'                              => 'Use This', // 3.4.2+
125 125
         'return_to_library'                     => 'Return to Library', // 3.4.2+
126 126
             
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 
133 133
         // Repeatable sections & fields
134 134
         'repeatable_section_is_disabled'        => 'The ability to repeat sections is disabled.', // 3.8.13+
135
-        'repeatable_field_is_disabled'          => 'The ability to repeat fields is disabled.',   // 3.8.13+
136
-        'warning_caption'                       => 'Warning',   // 3.8.13+
135
+        'repeatable_field_is_disabled'          => 'The ability to repeat fields is disabled.', // 3.8.13+
136
+        'warning_caption'                       => 'Warning', // 3.8.13+
137 137
 
138 138
         // AdminPageFramework_FormField
139 139
         'allowed_maximum_number_of_fields'      => 'The allowed maximum number of fields is {0}.', 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      * @since       3.2.0       Changed it to create an instance per text domain basis.
211 211
      * @remark      This class should be instantiated via this method.
212 212
      */
213
-    public static function getInstance( $sTextDomain='admin-page-framework' ) {
213
+    public static function getInstance( $sTextDomain = 'admin-page-framework' ) {
214 214
         
215 215
         $_oInstance = isset( self::$_aInstancesByTextDomain[ $sTextDomain ] ) && ( self::$_aInstancesByTextDomain[ $sTextDomain ] instanceof AdminPageFramework_Message )
216 216
             ? self::$_aInstancesByTextDomain[ $sTextDomain ]
@@ -223,21 +223,21 @@  discard block
 block discarded – undo
223 223
          * Ensures that only one instance of this class object exists. ( no multiple instances of this object ) 
224 224
          * @deprecated  3.2.0
225 225
          */
226
-        public static function instantiate( $sTextDomain='admin-page-framework' ) {
226
+        public static function instantiate( $sTextDomain = 'admin-page-framework' ) {
227 227
             return self::getInstance( $sTextDomain );
228 228
         }
229 229
         
230 230
     /**
231 231
      * Sets up properties.
232 232
      */
233
-    public function __construct( $sTextDomain='admin-page-framework' ) {
233
+    public function __construct( $sTextDomain = 'admin-page-framework' ) {
234 234
         
235 235
         $this->_sTextDomain = $sTextDomain;  
236 236
         
237 237
         // Fill the $aMessages property with the keys extracted from the $aDefaults property
238 238
         // with the value of null.  The null is set to let it trigger the __get() method 
239 239
         // so that each translation item gets processed individually.
240
-        $this->aMessages    = array_fill_keys( 
240
+        $this->aMessages = array_fill_keys( 
241 241
             array_keys( $this->aDefaults ),
242 242
             null        
243 243
         );
@@ -271,13 +271,13 @@  discard block
 block discarded – undo
271 271
      * @since       3.7.0      If no key is specified, return the entire mesage array.
272 272
      * @return      string|array
273 273
      */
274
-    public function get( $sKey='' ) {
275
-        if ( ! $sKey ) {
274
+    public function get( $sKey = '' ) {
275
+        if ( !$sKey ) {
276 276
             return $this->_getAllMessages();
277 277
         }
278 278
         return isset( $this->aMessages[ $sKey ] )
279 279
             ? __( $this->aMessages[ $sKey ], $this->_sTextDomain )
280
-            : __( $this->{$sKey}, $this->_sTextDomain );     // triggers __get()
280
+            : __( $this->{$sKey}, $this->_sTextDomain ); // triggers __get()
281 281
     }
282 282
         /**
283 283
          * Returns the all registered messag items.
Please login to merge, or discard this patch.
_view/script/AdminPageFramework_Form_View___Script_RepeatableSection.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
             return self::getAttributes( $_aAttriubtes ) . ' ' . self::getDataAttributes( $aArguments );
514 514
         }
515 515
         /**
516
-         * @return  array
516
+         * @return  string
517 517
          * @sicne   3.8.13
518 518
          */
519 519
         static private function ___getRemoveButtonAttributes( $sContainerTagID, $oMsg, $iSectionCount ) {
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 
533 533
         /**
534 534
          * @since       3.8.13
535
-         * @return array
535
+         * @return string
536 536
          */
537 537
         static private function ___getAddButtonAttributes( $sContainerTagID, $oMsg, $aArguments ) {
538 538
             return self::getAttributes(
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -520,7 +520,7 @@
 block discarded – undo
520 520
             return self::getAttributes(
521 521
                     array(
522 522
                     'class'     => 'repeatable-section-remove-button button-secondary '
523
-                                   . 'repeatable-section-button button button-large',
523
+                                    . 'repeatable-section-button button button-large',
524 524
                     'title'     => $oMsg->get( 'remove_section' ),
525 525
                     'style'     => $iSectionCount <= 1
526 526
                         ? 'display:none'
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
         if ( empty( $asArguments ) ) {
442 442
             return ''; 
443 443
         }
444
-        if ( self::hasBeenCalled( 'repeatable_section_' . $sContainerTagID ) ) {
444
+        if ( self::hasBeenCalled( 'repeatable_section_'.$sContainerTagID ) ) {
445 445
             return '';
446 446
         }
447 447
 
@@ -449,16 +449,16 @@  discard block
 block discarded – undo
449 449
         $_oFormatter    = new AdminPageFramework_Form_Model___Format_RepeatableSection( $asArguments, $oMsg );
450 450
         $_aArguments    = $_oFormatter->get();
451 451
         $_sButtons      = "<div class='admin-page-framework-repeatable-section-buttons-outer-container'>"
452
-                . "<div " . self::___getContainerAttributes( $_aArguments, $oMsg ) . ' >'
453
-                    . "<a " . self::___getRemoveButtonAttributes( $sContainerTagID, $oMsg, $iSectionCount ) . ">-</a>"
454
-                    . "<a " . self::___getAddButtonAttributes( $sContainerTagID, $oMsg, $_aArguments ) . ">+</a>"
452
+                . "<div ".self::___getContainerAttributes( $_aArguments, $oMsg ).' >'
453
+                    . "<a ".self::___getRemoveButtonAttributes( $sContainerTagID, $oMsg, $iSectionCount ).">-</a>"
454
+                    . "<a ".self::___getAddButtonAttributes( $sContainerTagID, $oMsg, $_aArguments ).">+</a>"
455 455
                 . "</div>"
456 456
             . "</div>"
457 457
             . AdminPageFramework_Form_Utility::getModalForDisabledRepeatableElement(
458
-                'repeatable_section_disabled_' . $sContainerTagID,
458
+                'repeatable_section_disabled_'.$sContainerTagID,
459 459
                 $_aArguments[ 'disabled' ]
460 460
             );
461
-        $_sButtonsHTML  = '"' . $_sButtons . '"';
461
+        $_sButtonsHTML  = '"'.$_sButtons.'"';
462 462
         $_aJSArray      = json_encode( $_aArguments );
463 463
         $_sScript       = <<<JAVASCRIPTS
464 464
 jQuery( document ).ready( function() {
@@ -505,12 +505,12 @@  discard block
 block discarded – undo
505 505
                     empty( $aArguments[ 'disabled' ] ) ? '' : 'disabled'
506 506
                 ),
507 507
             );
508
-            unset( $aArguments[ 'disabled' ][ 'message' ] );    // this element can contain HTML tags.
508
+            unset( $aArguments[ 'disabled' ][ 'message' ] ); // this element can contain HTML tags.
509 509
             // Needs to remove it if it is empty as its data attribute will be checked in the JavaScript script.
510 510
             if ( empty( $aArguments[ 'disabled' ] ) ) {
511 511
                 unset( $aArguments[ 'disabled' ] );
512 512
             }
513
-            return self::getAttributes( $_aAttriubtes ) . ' ' . self::getDataAttributes( $aArguments );
513
+            return self::getAttributes( $_aAttriubtes ).' '.self::getDataAttributes( $aArguments );
514 514
         }
515 515
         /**
516 516
          * @return  array
@@ -541,10 +541,10 @@  discard block
 block discarded – undo
541 541
                         . 'repeatable-section-button button button-large',
542 542
                     'title'     => $oMsg->get( 'add_section' ),
543 543
                     'data-id'   => $sContainerTagID,
544
-                    'href'      => ! empty( $aArguments[ 'disabled' ] )
545
-                        ? '#TB_inline?width=' . $aArguments[ 'disabled' ][ 'box_width' ]
546
-                            . '&height=' . $aArguments[ 'disabled' ][ 'box_height' ]
547
-                            . '&inlineId=' . 'repeatable_section_disabled_' . $sContainerTagID
544
+                    'href'      => !empty( $aArguments[ 'disabled' ] )
545
+                        ? '#TB_inline?width='.$aArguments[ 'disabled' ][ 'box_width' ]
546
+                            . '&height='.$aArguments[ 'disabled' ][ 'box_height' ]
547
+                            . '&inlineId='.'repeatable_section_disabled_'.$sContainerTagID
548 548
                         : null,
549 549
                 )
550 550
             );
Please login to merge, or discard this patch.
formatter/AdminPageFramework_Form_Model___Format_RepeatableSection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
      * @since   3.8.13
37 37
      */
38 38
     static protected $_aStructure_Disabled = array(
39
-        'message'    => 'The ability of repeating sections is disabled.',   // will be reassigned
40
-        'caption'    => 'Warning',  // will be reassigned
39
+        'message'    => 'The ability of repeating sections is disabled.', // will be reassigned
40
+        'caption'    => 'Warning', // will be reassigned
41 41
         'box_width'  => 300,
42 42
         'box_height' => 72,
43 43
     );
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function __construct( /* array $asArguments, $oMsg */ ) {
56 56
 
57
-        $_aParameters       = func_get_args() + array(
57
+        $_aParameters = func_get_args() + array(
58 58
             $this->_aArguments,
59 59
             null
60 60
         );
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
     public function get() {
74 74
 
75 75
         $_aArguments = $this->_aArguments + self::$_aStructure;
76
-        unset( $_aArguments[ 0 ] );   // remove the 0 index element converted from `'repeatable   => 'true',`.
77
-        if ( ! empty( $_aArguments[ 'disabled' ] ) ) {
76
+        unset( $_aArguments[ 0 ] ); // remove the 0 index element converted from `'repeatable   => 'true',`.
77
+        if ( !empty( $_aArguments[ 'disabled' ] ) ) {
78 78
             $_aArguments[ 'disabled' ] = $_aArguments[ 'disabled' ] + array(
79 79
                 'message'    => $this->_getDefaultMessage(),
80 80
                 'caption'    => $this->_oMsg->get( 'warning_caption' ),
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_Base.php 3 patches
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         'after_label'       => null,    
60 60
         'before_field'      => null,
61 61
         'after_field'       => null,
62
-        'label_min_width'   => '',   // (string|integer) min-width applied to the input label in pixels. 3.8.0+ Changed the default value from 140 to 0 as it is now applied via embedded CSS. When this value is set by the user, it is set inline and the value will be overridden. [3.8.4+] Changed the value from `0`  to `''`.
62
+        'label_min_width'   => '', // (string|integer) min-width applied to the input label in pixels. 3.8.0+ Changed the default value from 140 to 0 as it is now applied via embedded CSS. When this value is set by the user, it is set inline and the value will be overridden. [3.8.4+] Changed the value from `0`  to `''`.
63 63
         'before_fieldset'   => null, // 3.1.1+
64 64
         'after_fieldset'    => null, // 3.1.1+
65 65
         
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      * @param       object              $oMsg                   The framework message object.
100 100
      * @param       boolean             $bAutoRegister          Whether or not to register the field type(s).
101 101
      */
102
-    public function __construct( $asClassName='admin_page_framework', $asFieldTypeSlug=null, $oMsg=null, $bAutoRegister=true ) {
102
+    public function __construct( $asClassName = 'admin_page_framework', $asFieldTypeSlug = null, $oMsg = null, $bAutoRegister = true ) {
103 103
             
104 104
         $this->aFieldTypeSlugs  = empty( $asFieldTypeSlug ) 
105 105
             ? $this->aFieldTypeSlugs 
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
         
111 111
         // This automatically registers the field type. The build-in ones will be registered manually so it will be skipped.
112 112
         if ( $bAutoRegister ) {
113
-            foreach( ( array ) $asClassName as $_sClassName ) {
113
+            foreach ( ( array ) $asClassName as $_sClassName ) {
114 114
                 add_filter( 
115
-                    'field_types_' . $_sClassName, 
115
+                    'field_types_'.$_sClassName, 
116 116
                     array( $this, '_replyToRegisterInputFieldType' )
117 117
                 );
118 118
             }
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
         }
159 159
         return is_array( $asLabel ) // if the user sets multiple items
160 160
             ? $this->getElement( 
161
-                $asElement,         // subject
162
-                $this->getAsArray( $asKey, true /* preserve empty */ ),     // dimensional path 
161
+                $asElement, // subject
162
+                $this->getAsArray( $asKey, true /* preserve empty */ ), // dimensional path 
163 163
                 ''                  // default - if the element is not found, return an empty
164 164
             )
165 165
             : $asElement;
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     protected function getFieldOutput( array $aFieldset ) {
176 176
         
177
-        if ( ! is_object( $aFieldset[ '_caller_object' ] ) ) {
177
+        if ( !is_object( $aFieldset[ '_caller_object' ] ) ) {
178 178
             return '';
179 179
         }
180 180
 
@@ -182,14 +182,14 @@  discard block
 block discarded – undo
182 182
         $aFieldset[ '_parent_field_object' ] = $aFieldset[ '_field_object' ]; // 3.6.0+
183 183
         
184 184
         // 3.7.0+ The caller object is no longer a factory object but a form object.
185
-        $_oCallerForm   = $aFieldset[ '_caller_object' ];
185
+        $_oCallerForm = $aFieldset[ '_caller_object' ];
186 186
 
187 187
         $_oFieldset = new AdminPageFramework_Form_View___Fieldset( 
188
-            $aFieldset,                          // the field definition array
189
-            $_oCallerForm->aSavedData,               // the stored form data
190
-            $_oCallerForm->getFieldErrors(),         // the field error array.
191
-            $_oCallerForm->aFieldTypeDefinitions,    // the field type definition array.
192
-            $_oCallerForm->oMsg,                     // the system message object
188
+            $aFieldset, // the field definition array
189
+            $_oCallerForm->aSavedData, // the stored form data
190
+            $_oCallerForm->getFieldErrors(), // the field error array.
191
+            $_oCallerForm->aFieldTypeDefinitions, // the field type definition array.
192
+            $_oCallerForm->oMsg, // the system message object
193 193
             $_oCallerForm->aCallbacks                // field output element callables.
194 194
         );           
195 195
         return $_oFieldset->get();
@@ -229,13 +229,13 @@  discard block
 block discarded – undo
229 229
      * @since       3.0.3       Tweaked it to have better execution speed.
230 230
      * @internal
231 231
      */
232
-    public function getDefinitionArray( $sFieldTypeSlug='' ) {
232
+    public function getDefinitionArray( $sFieldTypeSlug = '' ) {
233 233
         
234 234
         // The uniteArrays() method resulted in somewhat being slow due to overhead on checking array keys for recursive array merges.
235 235
         $_aDefaultKeys = $this->aDefaultKeys + self::$_aDefaultKeys;
236
-        $_aDefaultKeys['attributes'] = isset( $this->aDefaultKeys['attributes'] ) && is_array( $this->aDefaultKeys['attributes'] )
237
-            ? $this->aDefaultKeys['attributes'] + self::$_aDefaultKeys['attributes'] 
238
-            : self::$_aDefaultKeys['attributes'];
236
+        $_aDefaultKeys[ 'attributes' ] = isset( $this->aDefaultKeys[ 'attributes' ] ) && is_array( $this->aDefaultKeys[ 'attributes' ] )
237
+            ? $this->aDefaultKeys[ 'attributes' ] + self::$_aDefaultKeys[ 'attributes' ] 
238
+            : self::$_aDefaultKeys[ 'attributes' ];
239 239
         
240 240
         return array(
241 241
             'sFieldTypeSlug'        => $sFieldTypeSlug,
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      * @since       3.0.0
274 274
      * @internal
275 275
      */
276
-    public function _replyToFieldTypeSetter( $sFieldSetType='' ) {
276
+    public function _replyToFieldTypeSetter( $sFieldSetType = '' ) {
277 277
         $this->_sFieldSetType = $sFieldSetType;
278 278
     }
279 279
     
@@ -327,8 +327,8 @@  discard block
 block discarded – undo
327 327
             wp_enqueue_script( 'media-upload' );    
328 328
         }
329 329
 
330
-        if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php', ) ) ) {     
331
-            add_filter( 'gettext', array( $this, '_replyToReplaceThickBoxText' ) , 1, 2 );     
330
+        if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php',) ) ) {     
331
+            add_filter( 'gettext', array( $this, '_replyToReplaceThickBoxText' ), 1, 2 );     
332 332
         }
333 333
         
334 334
     }
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
         public function _replyToReplaceThickBoxText( $sTranslated, $sText ) {
344 344
 
345 345
             // Replace the button label in the media thick box.
346
-            if ( ! in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) { 
346
+            if ( !in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) { 
347 347
                 return $sTranslated; 
348 348
             }
349 349
             if ( $sText !== 'Insert into Post' ) { 
@@ -353,8 +353,8 @@  discard block
 block discarded – undo
353 353
                 return $sTranslated; 
354 354
             }
355 355
             
356
-            if ( isset( $_GET['button_label'] ) ) { 
357
-                return $_GET['button_label']; 
356
+            if ( isset( $_GET[ 'button_label' ] ) ) { 
357
+                return $_GET[ 'button_label' ]; 
358 358
             }
359 359
 
360 360
             return $this->oProp->sThickBoxButtonUseThis 
@@ -373,11 +373,11 @@  discard block
 block discarded – undo
373 373
          */
374 374
         public function _replyToRemovingMediaLibraryTab( $aTabs ) {
375 375
             
376
-            if ( ! isset( $_REQUEST[ 'enable_external_source' ] ) ) {
376
+            if ( !isset( $_REQUEST[ 'enable_external_source' ] ) ) {
377 377
                 return $aTabs; 
378 378
             }
379 379
             
380
-            if ( ! $_REQUEST[ 'enable_external_source' ] ) {
380
+            if ( !$_REQUEST[ 'enable_external_source' ] ) {
381 381
                 unset( $aTabs[ 'type_url' ] ); // removes the 'From URL' tab in the thick box.
382 382
             }
383 383
             return $aTabs;
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
      * @since       3.8.0
393 393
      * @return      string
394 394
      */
395
-    protected function getLabelContainerAttributes( $aField, $asClassAttributes, array $aAttributes=array() ) {
395
+    protected function getLabelContainerAttributes( $aField, $asClassAttributes, array $aAttributes = array() ) {
396 396
 
397 397
         $aAttributes[ 'class' ] = $this->getClassAttribute( $asClassAttributes, $this->getElement( $aAttributes, 'class' ) );
398 398
         $aAttributes[ 'style' ] = $this->getStyleAttribute(
Please login to merge, or discard this patch.
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -320,14 +320,14 @@  discard block
 block discarded – undo
320 320
         wp_enqueue_script( 'thickbox' );
321 321
         wp_enqueue_style( 'thickbox' );
322 322
     
323
-        if ( function_exists( 'wp_enqueue_media' ) ) {     
323
+        if ( function_exists( 'wp_enqueue_media' ) ) {
324 324
             // If the WordPress version is 3.5 or above,
325 325
             new AdminPageFramework_Form_View___Script_MediaUploader( $this->oMsg );
326 326
         } else {
327 327
             wp_enqueue_script( 'media-upload' );    
328 328
         }
329 329
 
330
-        if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php', ) ) ) {     
330
+        if ( in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php', ) ) ) {
331 331
             add_filter( 'gettext', array( $this, '_replyToReplaceThickBoxText' ) , 1, 2 );     
332 332
         }
333 333
         
@@ -343,17 +343,17 @@  discard block
 block discarded – undo
343 343
         public function _replyToReplaceThickBoxText( $sTranslated, $sText ) {
344 344
 
345 345
             // Replace the button label in the media thick box.
346
-            if ( ! in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) { 
346
+            if ( ! in_array( $this->getPageNow(), array( 'media-upload.php', 'async-upload.php' ) ) ) {
347 347
                 return $sTranslated; 
348 348
             }
349
-            if ( $sText !== 'Insert into Post' ) { 
349
+            if ( $sText !== 'Insert into Post' ) {
350 350
                 return $sTranslated; 
351 351
             }
352
-            if ( $this->getQueryValueInURLByKey( wp_get_referer(), 'referrer' ) !== 'admin_page_framework' ) { 
352
+            if ( $this->getQueryValueInURLByKey( wp_get_referer(), 'referrer' ) !== 'admin_page_framework' ) {
353 353
                 return $sTranslated; 
354 354
             }
355 355
             
356
-            if ( isset( $_GET['button_label'] ) ) { 
356
+            if ( isset( $_GET['button_label'] ) ) {
357 357
                 return $_GET['button_label']; 
358 358
             }
359 359
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -390,6 +390,7 @@
 block discarded – undo
390 390
      * This is used for element that `label_min_width` is applied.
391 391
      * 
392 392
      * @since       3.8.0
393
+     * @param string $asClassAttributes
393 394
      * @return      string
394 395
      */
395 396
     protected function getLabelContainerAttributes( $aField, $asClassAttributes, array $aAttributes=array() ) {
Please login to merge, or discard this patch.
_common/form/_model/AdminPageFramework_Form_Model___SetFieldResources.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -90,16 +90,16 @@  discard block
 block discarded – undo
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( $_aClassNames as $_sClassName ) {
100
+            foreach ( $_aClassNames 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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.