Completed
Branch master (bf4987)
by Michael
03:55
created
form/_model/modifier/AdminPageFramework_Form_Model___Modifier_SortInput.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             
Please login to merge, or discard this patch.
_common/form/_model/AdminPageFramework_Form_Model___DefaultValues.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                 ); 
Please login to merge, or discard this patch.
element_definition/AdminPageFramework_Form_Model___FieldConditioner.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -60,18 +60,18 @@  discard block
 block discarded – undo
60 60
 
61 61
             // Drop keys of fields-array which do not exist in the sections-array. 
62 62
             // For this reasons, the sections-array should be conditioned first before applying this method.
63
-            $aFields    = $this->castArrayContents( $aSections, $aFields );
63
+            $aFields = $this->castArrayContents( $aSections, $aFields );
64 64
 
65 65
             $_aNewFields = array();
66
-            foreach( $aFields as $_sSectionID => $_aSubSectionOrFields ) {
66
+            foreach ( $aFields as $_sSectionID => $_aSubSectionOrFields ) {
67 67
                 
68 68
                 // This type check is important as the parsing field array is content-cast, which can set null value to elements.
69
-                if ( ! is_array( $_aSubSectionOrFields ) ) { 
69
+                if ( !is_array( $_aSubSectionOrFields ) ) { 
70 70
                     continue; 
71 71
                 }
72 72
                             
73 73
                 $this->_setConditionedFields( 
74
-                    $_aNewFields,   // by reference - gets updated in the method.
74
+                    $_aNewFields, // by reference - gets updated in the method.
75 75
                     $_aSubSectionOrFields, 
76 76
                     $_sSectionID
77 77
                 );
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
              */
92 92
             private function _setConditionedFields( array &$_aNewFields, $_aSubSectionOrFields, $_sSectionID ) {
93 93
                 
94
-                foreach( $_aSubSectionOrFields as $_sIndexOrFieldID => $_aSubSectionOrField ) {
94
+                foreach ( $_aSubSectionOrFields as $_sIndexOrFieldID => $_aSubSectionOrField ) {
95 95
                     
96 96
                     // If it is a sub-section array.
97 97
                     if ( $this->isNumericInteger( $_sIndexOrFieldID ) ) {
98 98
                         $_sSubSectionIndex  = $_sIndexOrFieldID;
99 99
                         $_aFields           = $_aSubSectionOrField;
100
-                        foreach( $_aFields as $_aField ) {
101
-                            if ( ! $this->_isAllowed( $_aField ) ) {
100
+                        foreach ( $_aFields as $_aField ) {
101
+                            if ( !$this->_isAllowed( $_aField ) ) {
102 102
                                 continue;
103 103
                             }
104 104
                             $_aNewFields[ $_sSectionID ][ $_sSubSectionIndex ][ $_aField[ 'field_id' ] ] = $_aField;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                     
110 110
                     // Otherwise, insert the formatted field definition array.
111 111
                     $_aField = $_aSubSectionOrField;
112
-                    if ( ! $this->_isAllowed( $_aField ) ) {
112
+                    if ( !$this->_isAllowed( $_aField ) ) {
113 113
                         continue;
114 114
                     }
115 115
                     $_aNewFields[ $_sSectionID ][ $_aField[ 'field_id' ] ] = $_aField;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
             foreach( $aFields as $_sSectionID => $_aSubSectionOrFields ) {
67 67
                 
68 68
                 // This type check is important as the parsing field array is content-cast, which can set null value to elements.
69
-                if ( ! is_array( $_aSubSectionOrFields ) ) { 
69
+                if ( ! is_array( $_aSubSectionOrFields ) ) {
70 70
                     continue; 
71 71
                 }
72 72
                             
Please login to merge, or discard this patch.
element_definition/AdminPageFramework_Form_Model___SectionConditioner.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  */
18 18
 class AdminPageFramework_Form_Model___SectionConditioner extends AdminPageFramework_WPUtility {
19 19
     
20
-    public $aSectionsets  = array();
20
+    public $aSectionsets = array();
21 21
 
22 22
     /**
23 23
      * Sets up hooks.
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $_aParameters = func_get_args() + array( 
29 29
             $this->aSectionsets, 
30 30
         );
31
-        $this->aSectionsets  = $_aParameters[ 0 ];                    
31
+        $this->aSectionsets = $_aParameters[ 0 ];                    
32 32
         
33 33
     }
34 34
 
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
      * @since       DEVVER      Moved from `AdminPageFramework_FormDefinition`. Changed the name from `getConditionedSections()`.
51 51
      * @return      array       The conditioned sectionsets array.
52 52
      */
53
-    private function _getSectionsConditioned( array $aSections=array() ) {
53
+    private function _getSectionsConditioned( array $aSections = array() ) {
54 54
         
55
-        $_aNewSections  = array();
56
-        foreach( $aSections as $_sSectionID => $_aSection ) {
57
-            if ( ! $this->_isAllowed( $_aSection ) ) {
55
+        $_aNewSections = array();
56
+        foreach ( $aSections as $_sSectionID => $_aSection ) {
57
+            if ( !$this->_isAllowed( $_aSection ) ) {
58 58
                 continue;                
59 59
             }
60 60
             $_aNewSections[ $_sSectionID ] = $_aSection;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     protected function _isAllowed( array $aDefinition ) {
74 74
         
75 75
         // Check capability. If the access level is not sufficient, skip.
76
-        if ( ! current_user_can( $aDefinition[ 'capability' ] ) ) { 
76
+        if ( !current_user_can( $aDefinition[ 'capability' ] ) ) { 
77 77
             return false;
78 78
         }
79 79
         return ( boolean ) $aDefinition[ 'if' ];
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
     protected function _isAllowed( array $aDefinition ) {
74 74
         
75 75
         // Check capability. If the access level is not sufficient, skip.
76
-        if ( ! current_user_can( $aDefinition[ 'capability' ] ) ) { 
76
+        if ( ! current_user_can( $aDefinition[ 'capability' ] ) ) {
77 77
             return false;
78 78
         }
79 79
         return ( boolean ) $aDefinition[ 'if' ];
Please login to merge, or discard this patch.
form/_model/AdminPageFramework_Form_Model___BuiltInFieldTypeDefinitions.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
                 $this->oMsg, 
82 82
                 false               // `false` to disable auto-registering.     
83 83
             );    
84
-            foreach( $_oFieldType->aFieldTypeSlugs as $_sSlug ) {     
84
+            foreach( $_oFieldType->aFieldTypeSlugs as $_sSlug ) {
85 85
                 $_aFieldTypeDefinitions[ $_sSlug ] = $_oFieldType->getDefinitionArray();
86 86
             }
87 87
         }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
         'posttype',
44 44
         'size',
45 45
         'section_title', // 3.0.0+
46
-        'system',        // 3.3.0+
47
-        'inline_mixed',  // 3.8.0+
48
-        '_nested',       // 3.8.0+
46
+        'system', // 3.3.0+
47
+        'inline_mixed', // 3.8.0+
48
+        '_nested', // 3.8.0+
49 49
     );    
50 50
     
51 51
     public $sCallerID = '';
@@ -75,16 +75,16 @@  discard block
 block discarded – undo
75 75
     public function get() {
76 76
         
77 77
         $_aFieldTypeDefinitions = array();
78
-        foreach( self::$_aDefaultFieldTypeSlugs as $_sFieldTypeSlug ) {
78
+        foreach ( self::$_aDefaultFieldTypeSlugs as $_sFieldTypeSlug ) {
79 79
             
80 80
             $_sFieldTypeClassName = "AdminPageFramework_FieldType_{$_sFieldTypeSlug}";
81 81
             $_oFieldType = new $_sFieldTypeClassName( 
82
-                $this->sCallerID,   // usually an instantiated class name
83
-                null,               // field type slugs - if it is different from the one defined in the class property
82
+                $this->sCallerID, // usually an instantiated class name
83
+                null, // field type slugs - if it is different from the one defined in the class property
84 84
                 $this->oMsg, 
85 85
                 false               // `false` to disable auto-registering.     
86 86
             );    
87
-            foreach( $_oFieldType->aFieldTypeSlugs as $_sSlug ) {     
87
+            foreach ( $_oFieldType->aFieldTypeSlugs as $_sSlug ) {     
88 88
                 $_aFieldTypeDefinitions[ $_sSlug ] = $_oFieldType->getDefinitionArray();
89 89
             }
90 90
         }
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_text.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      * @since       2.1.5
44 44
      * @since       3.3.1       Changed from `_replyToGetStyles()`.
45 45
      */        
46
-    protected function getStyles() { 
46
+    protected function getStyles() {
47 47
         return <<<CSSRULES
48 48
 /* Text Field Type */
49 49
 .admin-page-framework-field.admin-page-framework-field-text > .admin-page-framework-input-label-container {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     /**
40 40
      * Defines the field type slugs used for this field type.
41 41
      */
42
-    public $aFieldTypeSlugs = array( 'text', 'password', 'date', 'datetime', 'datetime-local', 'email', 'month', 'search', 'tel', 'url', 'week', );
42
+    public $aFieldTypeSlugs = array( 'text', 'password', 'date', 'datetime', 'datetime-local', 'email', 'month', 'search', 'tel', 'url', 'week',);
43 43
     
44 44
     /**
45 45
      * Defines the default key-values of this field type. 
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
     protected function getField( $aField ) {
84 84
 
85 85
         $_aOutput = array();
86
-        foreach( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) {
87
-            $_aOutput[] = $this->_getFieldOutputByLabel( 
86
+        foreach ( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) {
87
+            $_aOutput[ ] = $this->_getFieldOutputByLabel( 
88 88
                 $_sKey, 
89 89
                 $_sLabel, 
90 90
                 $aField
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         }
93 93
         
94 94
         // the repeatable field buttons will be replaced with this element.
95
-        $_aOutput[] = "<div class='repeatable-field-buttons'></div>";
95
+        $_aOutput[ ] = "<div class='repeatable-field-buttons'></div>";
96 96
         return implode( '', $_aOutput );
97 97
         
98 98
     }
@@ -112,23 +112,23 @@  discard block
 block discarded – undo
112 112
             $aField[ 'value' ]  = $this->getElementByLabel( $aField[ 'value' ], $sKey, $aField[ 'label' ] );
113 113
             $_aInputAttributes  = $_bIsArray
114 114
                 ? array(
115
-                        'name'  => $aField[ 'attributes' ][ 'name' ] . "[{$sKey}]",
116
-                        'id'    => $aField[ 'attributes' ][ 'id' ] . "_{$sKey}",
115
+                        'name'  => $aField[ 'attributes' ][ 'name' ]."[{$sKey}]",
116
+                        'id'    => $aField[ 'attributes' ][ 'id' ]."_{$sKey}",
117 117
                         'value' => $aField[ 'value' ],
118 118
                     ) 
119 119
                     + $aField[ 'attributes' ]
120 120
                 : $aField[ 'attributes' ];          
121
-            $_aOutput           = array(
121
+            $_aOutput = array(
122 122
                 $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $aField[ 'label' ] ),
123 123
                 "<div class='admin-page-framework-input-label-container {$_sClassSelector}'>",
124
-                    "<label for='" . $_aInputAttributes[ 'id' ] . "'>",
124
+                    "<label for='".$_aInputAttributes[ 'id' ]."'>",
125 125
                         $this->getElementByLabel( $aField[ 'before_input' ], $sKey, $aField[ 'label' ] ),
126 126
                         $_sLabel 
127
-                            ? "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">" 
127
+                            ? "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">" 
128 128
                                     . $_sLabel
129 129
                                 . "</span>"
130 130
                             : '',
131
-                        "<input " . $this->getAttributes( $_aInputAttributes ) . " />",
131
+                        "<input ".$this->getAttributes( $_aInputAttributes )." />",
132 132
                         $this->getElementByLabel( $aField[ 'after_input' ], $sKey, $aField[ 'label' ] ),
133 133
                     "</label>",
134 134
                 "</div>",
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_file.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     /**
21 21
      * Defines the field type slugs used for this field type.
22 22
      */
23
-    public $aFieldTypeSlugs = array( 'file', );
23
+    public $aFieldTypeSlugs = array( 'file',);
24 24
     
25 25
     /**
26 26
      * Defines the default key-values of this field type. 
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
                 array(
77 77
                     'type'  => 'hidden',
78 78
                     'value' => '',
79
-                    'name'  => $aField[ 'attributes' ][ 'name' ] . '[_dummy_value]',
79
+                    'name'  => $aField[ 'attributes' ][ 'name' ].'[_dummy_value]',
80 80
                 )
81 81
             )            
82 82
             . $this->getHTMLTag( 
83 83
                 'input',
84 84
                 array(
85 85
                     'type'  => 'hidden',
86
-                    'name'  => '__unset_' . $aField[ '_structure_type' ] . '[' . $aField[ '_input_name_flat' ] . '|_dummy_value' . ']',
87
-                    'value' => $aField[ '_input_name_flat' ] . '|_dummy_value',
86
+                    'name'  => '__unset_'.$aField[ '_structure_type' ].'['.$aField[ '_input_name_flat' ].'|_dummy_value'.']',
87
+                    'value' => $aField[ '_input_name_flat' ].'|_dummy_value',
88 88
                     'class' => 'unset-element-names element-address',
89 89
                 )
90 90
             );
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_image.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@
 block discarded – undo
277 277
         );        
278 278
     }    
279 279
     
280
-       /**
280
+        /**
281 281
          * Extracts meta box form fields options array from the given options array of an admin page.
282 282
          * 
283 283
          * @since       3.5.6
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
     /**
479 479
      * Returns the field type specific CSS rules.
480 480
      */ 
481
-    protected function getStyles() { 
481
+    protected function getStyles() {
482 482
         return <<<CSSRULES
483 483
 /* Image Field Preview Container */
484 484
 .admin-page-framework-field .image_preview {
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
          */
708 708
         protected function _getPreviewContainer( $aField, $sImageURL, $aPreviewAtrributes ) {
709 709
 
710
-            if ( ! $aField[ 'show_preview' ] ) { 
710
+            if ( ! $aField[ 'show_preview' ] ) {
711 711
                 return ''; 
712 712
             }
713 713
             
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     /**
60 60
      * Defines the field type slugs used for this field type.
61 61
      */
62
-    public $aFieldTypeSlugs = array( 'image', );
62
+    public $aFieldTypeSlugs = array( 'image',);
63 63
     
64 64
     /**
65 65
      * Defines the default key-values of this field type. 
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected $aDefaultKeys = array(
70 70
         'attributes_to_store'       => array(), // ( array ) This is for the image and media field type. The attributes to save besides URL. e.g. ( for the image field type ) array( 'title', 'alt', 'width', 'height', 'caption', 'id', 'align', 'link' ).
71
-        'show_preview'              => true,    // ( boolean ) Indicates whether the image preview should be displayed or not.
72
-        'allow_external_source'     => true,    // ( boolean ) Indicates whether the media library box has the From URL tab.
71
+        'show_preview'              => true, // ( boolean ) Indicates whether the image preview should be displayed or not.
72
+        'allow_external_source'     => true, // ( boolean ) Indicates whether the media library box has the From URL tab.
73 73
         'attributes'                => array(
74 74
             'input'     => array(
75 75
                 'size'      => 40,
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         return // $this->_getScript_CustomMediaUploaderObject() . PHP_EOL    
100 100
             $this->_getScript_ImageSelector( 
101 101
                 "admin_page_framework"
102
-            )  . PHP_EOL
102
+            ).PHP_EOL
103 103
             . $this->_getScript_RegisterCallbacks();
104 104
     }
105 105
         /**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             $_sInsertFromURL         = esc_js( $this->oMsg->get( 'insert_from_url' ) );
218 218
 
219 219
             // if the WordPress version is 3.4.x or below
220
-            if ( ! function_exists( 'wp_enqueue_media' ) ) {
220
+            if ( !function_exists( 'wp_enqueue_media' ) ) {
221 221
             
222 222
                 return <<<JAVASCRIPTS
223 223
 /**
@@ -605,13 +605,13 @@  discard block
 block discarded – undo
605 605
                 . "<label for='{$aField[ 'input_id' ]}'>"
606 606
                     . $aField[ 'before_input' ]
607 607
                     . $this->getAOrB(
608
-                        $aField[ 'label' ] && ! $aField[ 'repeatable' ],
609
-                        "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">" 
608
+                        $aField[ 'label' ] && !$aField[ 'repeatable' ],
609
+                        "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">" 
610 610
                             . $aField[ 'label' ] 
611 611
                         . "</span>",                        
612 612
                         ''                        
613 613
                     )
614
-                    . "<input " . $this->getAttributes( $this->_getImageInputAttributes( $aField, $_iCountAttributes, $_sImageURL, $_aBaseAttributes ) ) . " />" 
614
+                    . "<input ".$this->getAttributes( $this->_getImageInputAttributes( $aField, $_iCountAttributes, $_sImageURL, $_aBaseAttributes ) )." />" 
615 615
                     . $aField[ 'after_input' ]
616 616
                     . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element.
617 617
                     . $this->getExtraInputFields( $aField )
@@ -651,7 +651,7 @@  discard block
 block discarded – undo
651 651
          */
652 652
         private function _getBaseAttributes( array $aField ) {
653 653
             
654
-            $_aBaseAttributes   = $aField[ 'attributes' ] + array( 'class' => null );
654
+            $_aBaseAttributes = $aField[ 'attributes' ] + array( 'class' => null );
655 655
             unset( 
656 656
                 $_aBaseAttributes[ 'input' ], 
657 657
                 $_aBaseAttributes[ 'button' ], 
@@ -720,8 +720,8 @@  discard block
 block discarded – undo
720 720
         protected function getExtraInputFields( array $aField ) {
721 721
             
722 722
             $_aOutputs = array();
723
-            foreach( $this->getElementAsArray( $aField, 'attributes_to_store' ) as $sAttribute ) {
724
-                $_aOutputs[] = "<input " . $this->getAttributes( 
723
+            foreach ( $this->getElementAsArray( $aField, 'attributes_to_store' ) as $sAttribute ) {
724
+                $_aOutputs[ ] = "<input ".$this->getAttributes( 
725 725
                     array(
726 726
                         'id'        => "{$aField[ 'input_id' ]}_{$sAttribute}",
727 727
                         'type'      => 'hidden',
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
                             ''
738 738
                         ),
739 739
                     )
740
-                ) . "/>";
740
+                )."/>";
741 741
             }
742 742
             return implode( PHP_EOL, $_aOutputs );
743 743
             
@@ -750,17 +750,17 @@  discard block
 block discarded – undo
750 750
          */
751 751
         protected function _getPreviewContainer( $aField, $sImageURL, $aPreviewAtrributes ) {
752 752
 
753
-            if ( ! $aField[ 'show_preview' ] ) { 
753
+            if ( !$aField[ 'show_preview' ] ) { 
754 754
                 return ''; 
755 755
             }
756 756
             
757 757
             $sImageURL = esc_url( $this->getResolvedSRC( $sImageURL, true ) );
758 758
             return 
759
-                "<div " . $this->getAttributes( 
759
+                "<div ".$this->getAttributes( 
760 760
                         array(
761 761
                             'id'    => "image_preview_container_{$aField[ 'input_id' ]}",     
762
-                            'class' => 'image_preview ' . $this->getElement( $aPreviewAtrributes, 'class', '' ),
763
-                            'style' => $this->getAOrB( $sImageURL, '', "display: none; "  ) 
762
+                            'class' => 'image_preview '.$this->getElement( $aPreviewAtrributes, 'class', '' ),
763
+                            'style' => $this->getAOrB( $sImageURL, '', "display: none; " ) 
764 764
                                 . $this->getElement( $aPreviewAtrributes, 'style', '' ),
765 765
                         ) + $aPreviewAtrributes
766 766
                     )
@@ -783,12 +783,12 @@  discard block
 block discarded – undo
783 783
          */
784 784
         protected function _getUploaderButtonScript( $sInputID, $abRepeatable, $bExternalSource, array $aButtonAttributes ) {
785 785
             
786
-            $_bRepeatable     = ! empty( $abRepeatable );
786
+            $_bRepeatable = !empty( $abRepeatable );
787 787
             
788 788
             // Do not include the escaping character (backslash) in the heredoc variable declaration 
789 789
             // because the minifier script will parse it and the <<<JAVASCRIPTS and JAVASCRIPTS; parts are converted to double quotes (")
790 790
             // which causes the PHP syntax error.                
791
-            $_sButtonHTML     = '"' . $this->_getUploaderButtonHTML( $sInputID, $aButtonAttributes, $_bRepeatable, $bExternalSource ) . '"';
791
+            $_sButtonHTML     = '"'.$this->_getUploaderButtonHTML( $sInputID, $aButtonAttributes, $_bRepeatable, $bExternalSource ).'"';
792 792
             $_sRepeatable     = $this->getAOrB( $_bRepeatable, 'true', 'false' );
793 793
             $_bExternalSource = $this->getAOrB( $bExternalSource, 'true', 'false' );
794 794
             $_sScript = <<<JAVASCRIPTS
@@ -804,7 +804,7 @@  discard block
 block discarded – undo
804 804
                     . '/* <![CDATA[ */'
805 805
                     . $_sScript 
806 806
                     . '/* ]]> */'
807
-                . "</script>". PHP_EOL;
807
+                . "</script>".PHP_EOL;
808 808
 
809 809
         }
810 810
             /**
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
                     $bRepeatable, 
824 824
                     $bExternalSource 
825 825
                 );
826
-                return "<a " . $this->getAttributes( $_aAttributes ) . ">"
826
+                return "<a ".$this->getAttributes( $_aAttributes ).">"
827 827
                         . ( $_bIsLabelSet
828 828
                             ? $_aAttributes[ 'data-label' ] 
829 829
                             : ( strrpos( $_aAttributes[ 'class' ], 'dashicons' )
@@ -842,7 +842,7 @@  discard block
 block discarded – undo
842 842
                  */
843 843
                 private function _getFormattedUploadButtonAttributes( $sInputID, array $aButtonAttributes, $_bIsLabelSet, $bRepeatable, $bExternalSource ) {
844 844
                         
845
-                    $_aAttributes           = array(
845
+                    $_aAttributes = array(
846 846
                             'id'        => "select_image_{$sInputID}",
847 847
                             'href'      => '#',            
848 848
                             'data-uploader_type'            => ( string ) function_exists( 'wp_enqueue_media' ),
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
                                 : $this->oMsg->get( 'select_image' ),
856 856
                             'data-label' => null,
857 857
                         );
858
-                    $_aAttributes[ 'class' ]  = $this->getClassAttribute( 
858
+                    $_aAttributes[ 'class' ] = $this->getClassAttribute( 
859 859
                         'select_image button button-small ',
860 860
                         $this->getAOrB(
861 861
                             trim( $aButtonAttributes[ 'class' ] ),
@@ -883,16 +883,16 @@  discard block
 block discarded – undo
883 883
          * @return      string
884 884
          * @internal
885 885
          */
886
-        protected function _getRemoveButtonScript( $sInputID, array $aButtonAttributes, $sType='image' ) {
886
+        protected function _getRemoveButtonScript( $sInputID, array $aButtonAttributes, $sType = 'image' ) {
887 887
            
888
-            if ( ! function_exists( 'wp_enqueue_media' ) ) {
888
+            if ( !function_exists( 'wp_enqueue_media' ) ) {
889 889
                 return '';
890 890
             }
891 891
     
892 892
             // Do not include the escaping character (backslash) in the heredoc variable declaration 
893 893
             // because the minifier script will parse it and the <<<JAVASCRIPTS and JAVASCRIPTS; parts are converted to double quotes (")
894 894
             // which causes the PHP syntax error.                
895
-            $_sButtonHTML  = '"' . $this->_getRemoveButtonHTMLByType( $sInputID, $aButtonAttributes, $sType ) . '"';
895
+            $_sButtonHTML = '"'.$this->_getRemoveButtonHTMLByType( $sInputID, $aButtonAttributes, $sType ).'"';
896 896
             $_sScript = <<<JAVASCRIPTS
897 897
                 if ( 0 === jQuery( 'a#remove_{$sType}_{$sInputID}' ).length ) {
898 898
                     jQuery( 'input#{$sInputID}' ).after( $_sButtonHTML );
@@ -903,7 +903,7 @@  discard block
 block discarded – undo
903 903
                     . '/* <![CDATA[ */'
904 904
                     . $_sScript 
905 905
                     . '/* ]]> */'
906
-                . "</script>". PHP_EOL;
906
+                . "</script>".PHP_EOL;
907 907
            
908 908
         }
909 909
         
@@ -913,11 +913,11 @@  discard block
 block discarded – undo
913 913
          * @return      string      The generated HTML remove button output.
914 914
          * @internal
915 915
          */
916
-        protected function _getRemoveButtonHTMLByType( $sInputID, array $aButtonAttributes, $sType='image' ) {
916
+        protected function _getRemoveButtonHTMLByType( $sInputID, array $aButtonAttributes, $sType = 'image' ) {
917 917
         
918 918
             $_bIsLabelSet   = isset( $aButtonAttributes[ 'data-label' ] ) && $aButtonAttributes[ 'data-label' ];
919 919
             $_aAttributes   = $this->_getFormattedRemoveButtonAttributesByType( $sInputID, $aButtonAttributes, $_bIsLabelSet, $sType );
920
-            return "<a " . $this->getAttributes( $_aAttributes ) . ">"
920
+            return "<a ".$this->getAttributes( $_aAttributes ).">"
921 921
                     . ( $_bIsLabelSet
922 922
                         ? $_aAttributes[ 'data-label' ] 
923 923
                         : $this->getAOrB(
@@ -936,9 +936,9 @@  discard block
 block discarded – undo
936 936
              * @return      array       The formatted remove button attributes array.
937 937
              * @internal
938 938
              */
939
-            protected function _getFormattedRemoveButtonAttributesByType( $sInputID, array $aButtonAttributes, $_bIsLabelSet, $sType='image' ) {
939
+            protected function _getFormattedRemoveButtonAttributesByType( $sInputID, array $aButtonAttributes, $_bIsLabelSet, $sType = 'image' ) {
940 940
 
941
-                $_sOnClickFunctionName  = 'removeInputValuesFor' . ucfirst( $sType );
941
+                $_sOnClickFunctionName  = 'removeInputValuesFor'.ucfirst( $sType );
942 942
                 $_aAttributes           = array(
943 943
                         'id'        => "remove_{$sType}_{$sInputID}",
944 944
                         'href'      => '#',            
@@ -950,7 +950,7 @@  discard block
 block discarded – undo
950 950
                             ? $aButtonAttributes[ 'data-label' ] 
951 951
                             : $this->oMsg->get( 'remove_value' ),
952 952
                     );
953
-                $_aAttributes[ 'class' ]  = $this->getClassAttribute( 
953
+                $_aAttributes[ 'class' ] = $this->getClassAttribute( 
954 954
                     "remove_value remove_{$sType} button button-small", 
955 955
                     $this->getAOrB(
956 956
                         trim( $aButtonAttributes[ 'class' ] ),
Please login to merge, or discard this patch.
_common/form/field_type/AdminPageFramework_FieldType_section_title.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     /**
26 26
      * Defines the field type slugs used for this field type.
27 27
      */
28
-    public $aFieldTypeSlugs = array( 'section_title', );
28
+    public $aFieldTypeSlugs = array( 'section_title',);
29 29
     
30 30
     /**
31 31
      * Defines the default key-values of this field type. 
Please login to merge, or discard this patch.