Completed
Branch dev (a3767f)
by Michael
40:38
created
factory/_abstract/form/field_type/AdminPageFramework_FieldType_posttype.php 1 patch
Spacing   +17 added lines, -17 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( 'posttype', );
23
+    public $aFieldTypeSlugs = array( 'posttype',);
24 24
     
25 25
     /**
26 26
      * Defines the default key-values of this field type. 
@@ -28,19 +28,19 @@  discard block
 block discarded – undo
28 28
      * @remark $_aDefaultKeys holds shared default key-values defined in the base class.
29 29
      */
30 30
     protected $aDefaultKeys = array(
31
-        'slugs_to_remove'       => null,    // the default array will be assigned in the rendering method.
31
+        'slugs_to_remove'       => null, // the default array will be assigned in the rendering method.
32 32
         /** 
33 33
          * Accepts query arguments. For the specification, see the arg parameter of get_post_types() function.
34 34
          * See: http://codex.wordpress.org/Function_Reference/get_post_types#Parameters
35 35
          */
36
-        'query'                 => array(),  // 3.2.1+
37
-        'operator'              => 'and',    // 3.2.1+ either 'and' or 'or'
36
+        'query'                 => array(), // 3.2.1+
37
+        'operator'              => 'and', // 3.2.1+ either 'and' or 'or'
38 38
         'attributes'            => array(
39 39
             'size'      => 30,
40 40
             'maxlength' => 400,
41 41
         ),    
42
-        'select_all_button'     => true,     // 3.3.0+   to change the label, set the label here
43
-        'select_none_button'    => true,     // 3.3.0+   to change the label, set the label here        
42
+        'select_all_button'     => true, // 3.3.0+   to change the label, set the label here
43
+        'select_none_button'    => true, // 3.3.0+   to change the label, set the label here        
44 44
     );
45 45
     protected $aDefaultRemovingPostTypeSlugs = array(
46 46
         'revision', 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */ 
56 56
     protected function getStyles() {
57 57
         $_sParentStyles = parent::getStyles();
58
-        return $_sParentStyles . <<<CSSRULES
58
+        return $_sParentStyles.<<<CSSRULES
59 59
 /* Posttype Field Type */
60 60
 .admin-page-framework-field input[type='checkbox'] {
61 61
     margin-right: 0.5em;
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
      */
81 81
     protected function getField( $aField ) {
82 82
         
83
-        $this->_sCheckboxClassSelector = '';    // disable the checkbox class selector.
84
-        $aField['label'] = $this->_getPostTypeArrayForChecklist( 
85
-            isset( $aField['slugs_to_remove'] ) 
86
-                ? $this->getAsArray( $aField['slugs_to_remove'] ) 
87
-                : $this->aDefaultRemovingPostTypeSlugs,    // slugs to remove
88
-            $aField['query'],
89
-            $aField['operator']
83
+        $this->_sCheckboxClassSelector = ''; // disable the checkbox class selector.
84
+        $aField[ 'label' ] = $this->_getPostTypeArrayForChecklist( 
85
+            isset( $aField[ 'slugs_to_remove' ] ) 
86
+                ? $this->getAsArray( $aField[ 'slugs_to_remove' ] ) 
87
+                : $this->aDefaultRemovingPostTypeSlugs, // slugs to remove
88
+            $aField[ 'query' ],
89
+            $aField[ 'operator' ]
90 90
         );
91 91
         return parent::getField( $aField );
92 92
             
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
          * @param   $sOperator          array   The query operator.
105 105
          * @return  array   The array holding the elements of installed post types' labels and their slugs except the specified expluding post types.
106 106
          */ 
107
-        private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs=array(), $sOperator='and' ) {
107
+        private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs = array(), $sOperator = 'and' ) {
108 108
             
109 109
             $_aPostTypes = array();
110
-            foreach( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) {
111
-                if (  isset( $_oPostType->name, $_oPostType->label ) ) {
110
+            foreach ( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) {
111
+                if ( isset( $_oPostType->name, $_oPostType->label ) ) {
112 112
                     $_aPostTypes[ $_oPostType->name ] = $_oPostType->label;
113 113
                 }
114 114
             }
Please login to merge, or discard this patch.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_radio.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
      */
76 76
     protected function getField( $aField ) {
77 77
         
78
-        $_aOutput   = array();
79
-        foreach( $this->getAsArray( $aField['label'] ) as $_sKey => $_sLabel ) {            
80
-            $_aOutput[] = $this->_getEachRadioButtonOutput( $aField, $_sKey, $_sLabel );
78
+        $_aOutput = array();
79
+        foreach ( $this->getAsArray( $aField[ 'label' ] ) as $_sKey => $_sLabel ) {            
80
+            $_aOutput[ ] = $this->_getEachRadioButtonOutput( $aField, $_sKey, $_sLabel );
81 81
         }
82
-        $_aOutput[] = $this->_getUpdateCheckedScript( $aField['input_id'] );
82
+        $_aOutput[ ] = $this->_getUpdateCheckedScript( $aField[ 'input_id' ] );
83 83
         return implode( PHP_EOL, $_aOutput );
84 84
             
85 85
     }
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
          */
91 91
         private function _getEachRadioButtonOutput( array $aField, $sKey, $sLabel ) {
92 92
             
93
-            $_oRadio = new AdminPageFramework_Input_radio( $aField['attributes'] );
93
+            $_oRadio = new AdminPageFramework_Input_radio( $aField[ 'attributes' ] );
94 94
             $_oRadio->setAttributesByKey( $sKey );
95
-            $_oRadio->setAttribute( 'data-default', $aField['default'] ); // refered by the repeater script
95
+            $_oRadio->setAttribute( 'data-default', $aField[ 'default' ] ); // refered by the repeater script
96 96
            
97 97
             // Output
98 98
             return $this->getElement( $aField, array( 'before_label', $sKey ) )
99
-                . "<div class='admin-page-framework-input-label-container admin-page-framework-radio-label' style='min-width: " . $this->sanitizeLength( $aField['label_min_width'] ) . ";'>"
100
-                    . "<label " . $this->getAttributes( 
99
+                . "<div class='admin-page-framework-input-label-container admin-page-framework-radio-label' style='min-width: ".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>"
100
+                    . "<label ".$this->getAttributes( 
101 101
                             array(
102 102
                                 'for'   => $_oRadio->getAttribute( 'id' ),
103 103
                                 'class' => $_oRadio->getAttribute( 'disabled' )
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
     protected function getField( $aField ) {
77 77
         
78 78
         $_aOutput   = array();
79
-        foreach( $this->getAsArray( $aField['label'] ) as $_sKey => $_sLabel ) {            
79
+        foreach( $this->getAsArray( $aField['label'] ) as $_sKey => $_sLabel ) {
80 80
             $_aOutput[] = $this->_getEachRadioButtonOutput( $aField, $_sKey, $_sLabel );
81 81
         }
82 82
         $_aOutput[] = $this->_getUpdateCheckedScript( $aField['input_id'] );
Please login to merge, or discard this patch.
_abstract/form/field_type/AdminPageFramework_FieldType_section_title.php 2 patches
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.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Admin Page Framework
4
- * 
5
- * http://en.michaeluno.jp/admin-page-framework/
6
- * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
- * 
8
- */
3
+         * Admin Page Framework
4
+         * 
5
+         * http://en.michaeluno.jp/admin-page-framework/
6
+         * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
+         * 
8
+         */
9 9
 
10 10
 /**
11 11
  * Provides methods to handle importing options.
Please login to merge, or discard this patch.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_select.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * Defines the field type slugs used for this field type.
23 23
      */
24
-    public $aFieldTypeSlugs = array( 'select', );
24
+    public $aFieldTypeSlugs = array( 'select',);
25 25
     
26 26
     /**
27 27
      * Defines the default key-values of this field type. 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             'select'    => array(
34 34
                 'size'          => 1,
35 35
                 'autofocusNew'  => null,
36
-                'multiple'      => null,    // set 'multiple' for multiple selections. If 'is_multiple' is set, it takes the precedence.
36
+                'multiple'      => null, // set 'multiple' for multiple selections. If 'is_multiple' is set, it takes the precedence.
37 37
                 'required'      => null,     
38 38
             ),
39 39
             'optgroup'  => array(),
@@ -71,21 +71,21 @@  discard block
 block discarded – undo
71 71
      */
72 72
     protected function getField( $aField ) {
73 73
             
74
-        $_oSelectInput = new AdminPageFramework_Input_select( $aField['attributes'] );
75
-        if ( $aField['is_multiple']  ) {            
74
+        $_oSelectInput = new AdminPageFramework_Input_select( $aField[ 'attributes' ] );
75
+        if ( $aField[ 'is_multiple' ] ) {            
76 76
             $_oSelectInput->setAttribute( array( 'select', 'multiple' ), 'multiple' );
77 77
         }
78 78
         return
79
-            $aField['before_label']
80
-            . "<div class='admin-page-framework-input-label-container admin-page-framework-select-label' style='min-width: " . $this->sanitizeLength( $aField['label_min_width'] ) . ";'>"
81
-                . "<label for='{$aField['input_id']}'>"
82
-                    . $aField['before_input']
83
-                    . $_oSelectInput->get( $aField['label'] )
84
-                    . $aField['after_input']
79
+            $aField[ 'before_label' ]
80
+            . "<div class='admin-page-framework-input-label-container admin-page-framework-select-label' style='min-width: ".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>"
81
+                . "<label for='{$aField[ 'input_id' ]}'>"
82
+                    . $aField[ 'before_input' ]
83
+                    . $_oSelectInput->get( $aField[ 'label' ] )
84
+                    . $aField[ 'after_input' ]
85 85
                     . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element.
86 86
                 . "</label>"     
87 87
             . "</div>"
88
-            . $aField['after_label'];         
88
+            . $aField[ 'after_label' ];         
89 89
         
90 90
     }
91 91
         
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     protected function getField( $aField ) {
73 73
             
74 74
         $_oSelectInput = new AdminPageFramework_Input_select( $aField['attributes'] );
75
-        if ( $aField['is_multiple']  ) {            
75
+        if ( $aField['is_multiple']  ) {
76 76
             $_oSelectInput->setAttribute( array( 'select', 'multiple' ), 'multiple' );
77 77
         }
78 78
         return
Please login to merge, or discard this patch.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_submit.php 2 patches
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * Defines the field type slugs used for this field type.
23 23
      */
24
-    public $aFieldTypeSlugs = array( 'submit', );
24
+    public $aFieldTypeSlugs = array( 'submit',);
25 25
     
26 26
     /**
27 27
      * Defines the default key-values of this field type. 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         'redirect_url'  => null,
33 33
         'href'          => null,
34 34
         'reset'         => null, 
35
-        'email'         => null,    // [3.3.0+] string of an email address to send to or it can be an array with the following keys.
35
+        'email'         => null, // [3.3.0+] string of an email address to send to or it can be an array with the following keys.
36 36
         /* 
37 37
             array(
38 38
                 'to'            => null,    // string|array     The email address to send to or an array representing the key structure of the submitted form data holding the value. The first key should be the section ID and the second key is the the field ID.
@@ -76,17 +76,17 @@  discard block
 block discarded – undo
76 76
         $_aLabelContainerAttributes = $this->_getLabelContainerAttributes( $aField );
77 77
 
78 78
         return 
79
-            $aField['before_label']
80
-            . "<div " . $this->getAttributes( $_aLabelContainerAttributes ) . ">"
79
+            $aField[ 'before_label' ]
80
+            . "<div ".$this->getAttributes( $_aLabelContainerAttributes ).">"
81 81
                 . $this->_getExtraFieldsBeforeLabel( $aField ) // this is for the import field type that cannot place file input tag inside the label tag.
82
-                . "<label " . $this->getAttributes( $_aLabelAttributes ) . ">"
83
-                    . $aField['before_input']
82
+                . "<label ".$this->getAttributes( $_aLabelAttributes ).">"
83
+                    . $aField[ 'before_input' ]
84 84
                     . $this->_getExtraInputFields( $aField )
85
-                    . "<input " . $this->getAttributes( $_aInputAttributes ) . " />" // this method is defined in the base class
86
-                    . $aField['after_input']
85
+                    . "<input ".$this->getAttributes( $_aInputAttributes )." />" // this method is defined in the base class
86
+                    . $aField[ 'after_input' ]
87 87
                 . "</label>"
88 88
             . "</div>"
89
-            . $aField['after_label'];
89
+            . $aField[ 'after_label' ];
90 90
         
91 91
     }
92 92
         /**
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
          */
97 97
         private function _getFormatedFieldArray( array $aField ) {
98 98
             
99
-            $aField['label'] = $aField['label'] 
100
-                ? $aField['label'] 
99
+            $aField[ 'label' ] = $aField[ 'label' ] 
100
+                ? $aField[ 'label' ] 
101 101
                 : $this->oMsg->get( 'submit' );
102 102
             
103
-            if ( isset( $aField['attributes']['src'] ) ) {
104
-                $aField['attributes']['src'] = $this->getResolvedSRC( $aField['attributes']['src'] );
103
+            if ( isset( $aField[ 'attributes' ][ 'src' ] ) ) {
104
+                $aField[ 'attributes' ][ 'src' ] = $this->getResolvedSRC( $aField[ 'attributes' ][ 'src' ] );
105 105
             }            
106 106
             return $aField;
107 107
             
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
          */            
114 114
         private function _getLabelAttributes( array $aField, array $aInputAttributes ) {
115 115
             return array(
116
-                'style' => $aField['label_min_width'] 
117
-                    ? "min-width:" . $this->sanitizeLength( $aField['label_min_width'] ) . ";" 
116
+                'style' => $aField[ 'label_min_width' ] 
117
+                    ? "min-width:".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";" 
118 118
                     : null,
119
-                'for'   => $aInputAttributes['id'],
120
-                'class' => $aInputAttributes['disabled'] 
119
+                'for'   => $aInputAttributes[ 'id' ],
120
+                'class' => $aInputAttributes[ 'disabled' ] 
121 121
                     ? 'disabled' 
122 122
                     : null,
123 123
             );
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
          */        
130 130
         private function _getLabelContainerAttributes( array $aField ) {           
131 131
             return array(
132
-                'style' => $aField['label_min_width'] 
133
-                    ? "min-width:" . $this->sanitizeLength( $aField['label_min_width'] ) . ";" 
132
+                'style' => $aField[ 'label_min_width' ] 
133
+                    ? "min-width:".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";" 
134 134
                     : null,
135 135
                 'class' => 'admin-page-framework-input-label-container'
136 136
                     . ' admin-page-framework-input-button-container'
@@ -143,14 +143,14 @@  discard block
 block discarded – undo
143 143
          * @return      array       The input attribute array.
144 144
          */
145 145
         private function _getInputAttributes( array $aField ) {
146
-            $_bIsImageButton    = isset( $aField['attributes']['src'] ) && filter_var( $aField['attributes']['src'], FILTER_VALIDATE_URL );
146
+            $_bIsImageButton    = isset( $aField[ 'attributes' ][ 'src' ] ) && filter_var( $aField[ 'attributes' ][ 'src' ], FILTER_VALIDATE_URL );
147 147
             $_sValue            = $this->_getInputFieldValueFromLabel( $aField );
148 148
             return array(
149 149
                     // the type must be set because child class including export will use this method; in that case, the export type will be assigned which input tag does not support
150 150
                     'type'  => $_bIsImageButton ? 'image' : 'submit', 
151 151
                     'value' => $_sValue,
152 152
                 ) 
153
-                + $aField['attributes']
153
+                + $aField[ 'attributes' ]
154 154
                 + array(
155 155
                     'title' => $_sValue,
156 156
                     'alt'   => $_bIsImageButton ? 'submit' : '',
@@ -175,35 +175,35 @@  discard block
 block discarded – undo
175 175
     protected function _getExtraInputFields( &$aField ) {
176 176
         
177 177
         $_aOutput   = array();
178
-        $_aOutput[] = $this->getHTMLTag( 
178
+        $_aOutput[ ] = $this->getHTMLTag( 
179 179
             'input',
180 180
             array(
181 181
                 'type'  => 'hidden',
182
-                'name'  => "__submit[{$aField['input_id']}][input_id]",
183
-                'value' => $aField['input_id'],
182
+                'name'  => "__submit[{$aField[ 'input_id' ]}][input_id]",
183
+                'value' => $aField[ 'input_id' ],
184 184
             )
185 185
         );
186
-        $_aOutput[] = $this->getHTMLTag( 
186
+        $_aOutput[ ] = $this->getHTMLTag( 
187 187
             'input',
188 188
             array(
189 189
                 'type'  => 'hidden',
190
-                'name'  => "__submit[{$aField['input_id']}][field_id]",
191
-                'value' => $aField['field_id'],
190
+                'name'  => "__submit[{$aField[ 'input_id' ]}][field_id]",
191
+                'value' => $aField[ 'field_id' ],
192 192
             ) 
193 193
         );            
194
-        $_aOutput[] = $this->getHTMLTag( 
194
+        $_aOutput[ ] = $this->getHTMLTag( 
195 195
             'input',
196 196
             array(
197 197
                 'type'  => 'hidden',
198
-                'name'  => "__submit[{$aField['input_id']}][name]",
199
-                'value' => $aField['_input_name_flat'],
198
+                'name'  => "__submit[{$aField[ 'input_id' ]}][name]",
199
+                'value' => $aField[ '_input_name_flat' ],
200 200
             ) 
201 201
         );         
202
-        $_aOutput[] = $this->_getHiddenInput_SectionID( $aField );
203
-        $_aOutput[] = $this->_getHiddenInputByKey( $aField, 'redirect_url' );       
204
-        $_aOutput[] = $this->_getHiddenInputByKey( $aField, 'href' );       
205
-        $_aOutput[] = $this->_getHiddenInput_Reset( $aField );
206
-        $_aOutput[] = $this->_getHiddenInput_Email( $aField );
202
+        $_aOutput[ ] = $this->_getHiddenInput_SectionID( $aField );
203
+        $_aOutput[ ] = $this->_getHiddenInputByKey( $aField, 'redirect_url' );       
204
+        $_aOutput[ ] = $this->_getHiddenInputByKey( $aField, 'href' );       
205
+        $_aOutput[ ] = $this->_getHiddenInput_Reset( $aField );
206
+        $_aOutput[ ] = $this->_getHiddenInput_Email( $aField );
207 207
         return implode( PHP_EOL, array_filter( $_aOutput ) );  
208 208
         
209 209
     }
@@ -219,9 +219,9 @@  discard block
 block discarded – undo
219 219
                 'input',
220 220
                 array(
221 221
                     'type'  => 'hidden',
222
-                    'name'  => "__submit[{$aField['input_id']}][section_id]",
223
-                    'value' => isset( $aField['section_id'] ) && '_default' !== $aField['section_id'] 
224
-                        ? $aField['section_id'] 
222
+                    'name'  => "__submit[{$aField[ 'input_id' ]}][section_id]",
223
+                    'value' => isset( $aField[ 'section_id' ] ) && '_default' !== $aField[ 'section_id' ] 
224
+                        ? $aField[ 'section_id' ] 
225 225
                         : '',
226 226
                 ) 
227 227
             );                  
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                     'input',
240 240
                     array(
241 241
                         'type'  => 'hidden',
242
-                        'name'  => "__submit[{$aField['input_id']}][{$sKey}]",
242
+                        'name'  => "__submit[{$aField[ 'input_id' ]}][{$sKey}]",
243 243
                         'value' => $aField[ $sKey ],
244 244
                     ) 
245 245
                 )
@@ -253,15 +253,15 @@  discard block
 block discarded – undo
253 253
          * @return      string      the HTML input tag output for the 'reset' argument.
254 254
          */        
255 255
         private function _getHiddenInput_Reset( array $aField ) {
256
-            if ( ! $aField['reset'] ) {
256
+            if ( !$aField[ 'reset' ] ) {
257 257
                 return '';
258 258
             }
259
-            return ! $this->_checkConfirmationDisplayed( $aField['_input_name_flat'], 'reset' )
259
+            return !$this->_checkConfirmationDisplayed( $aField[ '_input_name_flat' ], 'reset' )
260 260
                 ? $this->getHTMLTag( 
261 261
                     'input',
262 262
                     array(
263 263
                         'type'  => 'hidden',
264
-                        'name'  => "__submit[{$aField['input_id']}][is_reset]",
264
+                        'name'  => "__submit[{$aField[ 'input_id' ]}][is_reset]",
265 265
                         'value' => '1',
266 266
                     ) 
267 267
                 )
@@ -269,10 +269,10 @@  discard block
 block discarded – undo
269 269
                     'input',
270 270
                     array(
271 271
                         'type'  => 'hidden',
272
-                        'name'  => "__submit[{$aField['input_id']}][reset_key]",
273
-                        'value' => is_array( $aField['reset'] )   // set the option array key to delete.
274
-                            ? implode( '|', $aField['reset'] )
275
-                            : $aField['reset'],
272
+                        'name'  => "__submit[{$aField[ 'input_id' ]}][reset_key]",
273
+                        'value' => is_array( $aField[ 'reset' ] )   // set the option array key to delete.
274
+                            ? implode( '|', $aField[ 'reset' ] )
275
+                            : $aField[ 'reset' ],
276 276
                     )
277 277
                 );      
278 278
         }
@@ -285,19 +285,19 @@  discard block
 block discarded – undo
285 285
          */ 
286 286
         private function _getHiddenInput_Email( array $aField ) {
287 287
             
288
-            if ( empty( $aField['email'] ) ) {
288
+            if ( empty( $aField[ 'email' ] ) ) {
289 289
                 return '';
290 290
             }
291 291
             $this->setTransient( 
292
-                'apf_em_' . md5( $aField['_input_name_flat'] . get_current_user_id() ), 
293
-                $aField['email'] 
292
+                'apf_em_'.md5( $aField[ '_input_name_flat' ].get_current_user_id() ), 
293
+                $aField[ 'email' ] 
294 294
             );
295
-            return ! $this->_checkConfirmationDisplayed( $aField['_input_name_flat'], 'email' )
295
+            return !$this->_checkConfirmationDisplayed( $aField[ '_input_name_flat' ], 'email' )
296 296
                 ? $this->getHTMLTag( 
297 297
                     'input',
298 298
                     array(
299 299
                         'type'  => 'hidden',
300
-                        'name'  => "__submit[{$aField['input_id']}][confirming_sending_email]",
300
+                        'name'  => "__submit[{$aField[ 'input_id' ]}][confirming_sending_email]",
301 301
                         'value' => '1',
302 302
                     ) 
303 303
                 )
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
                     'input',
306 306
                     array(
307 307
                         'type'  => 'hidden',
308
-                        'name'  => "__submit[{$aField['input_id']}][confirmed_sending_email]",
308
+                        'name'  => "__submit[{$aField[ 'input_id' ]}][confirmed_sending_email]",
309 309
                         'value' => '1',
310 310
                     ) 
311 311
                 );                
@@ -315,19 +315,19 @@  discard block
 block discarded – undo
315 315
          * A helper function for the above getSubmitField() that checks if a reset confirmation message has been displayed or not when the 'reset' key is set.
316 316
          * 
317 317
          */
318
-        private function _checkConfirmationDisplayed( $sFlatFieldName, $sType='reset' ) {
318
+        private function _checkConfirmationDisplayed( $sFlatFieldName, $sType = 'reset' ) {
319 319
                             
320
-            switch( $sType ) {
320
+            switch ( $sType ) {
321 321
                 default:
322 322
                 case 'reset':       // admin page framework _ reset confirmation
323
-                    $_sTransientKey = 'apf_rc_' . md5( $sFlatFieldName . get_current_user_id() );
323
+                    $_sTransientKey = 'apf_rc_'.md5( $sFlatFieldName.get_current_user_id() );
324 324
                     break;
325 325
                 case 'email':       // admin page framework _ email confirmation
326
-                    $_sTransientKey = 'apf_ec_' . md5( $sFlatFieldName . get_current_user_id() );   
326
+                    $_sTransientKey = 'apf_ec_'.md5( $sFlatFieldName.get_current_user_id() );   
327 327
                     break;
328 328
             }
329 329
             
330
-            $_bConfirmed        = false === $this->getTransient( $_sTransientKey ) 
330
+            $_bConfirmed = false === $this->getTransient( $_sTransientKey ) 
331 331
                 ? false
332 332
                 : true;
333 333
             
@@ -357,12 +357,12 @@  discard block
 block discarded – undo
357 357
     protected function _getInputFieldValueFromLabel( $aField ) {    
358 358
         
359 359
         // If the value key is explicitly set, use it. But the empty string will be ignored.
360
-        if ( isset( $aField['value'] ) && $aField['value'] != '' ) { return $aField['value']; }
360
+        if ( isset( $aField[ 'value' ] ) && $aField[ 'value' ] != '' ) { return $aField[ 'value' ]; }
361 361
         
362
-        if ( isset( $aField['label'] ) ) { return $aField['label']; }
362
+        if ( isset( $aField[ 'label' ] ) ) { return $aField[ 'label' ]; }
363 363
         
364 364
         // If the default value is set,
365
-        if ( isset( $aField['default'] ) ) { return $aField['default']; }
365
+        if ( isset( $aField[ 'default' ] ) ) { return $aField[ 'default' ]; }
366 366
         
367 367
     }
368 368
     
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
          * @since       3.5.3
128 128
          * @return      array       The label container attribute array.
129 129
          */        
130
-        private function _getLabelContainerAttributes( array $aField ) {           
130
+        private function _getLabelContainerAttributes( array $aField ) {
131 131
             return array(
132 132
                 'style' => $aField['label_min_width'] 
133 133
                     ? "min-width:" . $this->sanitizeLength( $aField['label_min_width'] ) . ";" 
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
      * @since   2.0.0
355 355
      * @since   2.1.5 Moved from AdminPageFramwrork_InputField. Changed the scope to protected from private. Removed the second parameter.
356 356
      */ 
357
-    protected function _getInputFieldValueFromLabel( $aField ) {    
357
+    protected function _getInputFieldValueFromLabel( $aField ) {
358 358
         
359 359
         // If the value key is explicitly set, use it. But the empty string will be ignored.
360 360
         if ( isset( $aField['value'] ) && $aField['value'] != '' ) { return $aField['value']; }
Please login to merge, or discard this patch.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_text.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     /**
24 24
      * Defines the field type slugs used for this field type.
25 25
      */
26
-    public $aFieldTypeSlugs = array( 'text', 'password', 'date', 'datetime', 'datetime-local', 'email', 'month', 'search', 'tel', 'url', 'week', );
26
+    public $aFieldTypeSlugs = array( 'text', 'password', 'date', 'datetime', 'datetime-local', 'email', 'month', 'search', 'tel', 'url', 'week',);
27 27
     
28 28
     /**
29 29
      * Defines the default key-values of this field type. 
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
     protected function getField( $aField ) {
69 69
         
70 70
         $_aOutput = array();
71
-        foreach( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) {
72
-            $_aOutput[] = $this->_getFieldOutputByLabel( 
71
+        foreach ( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) {
72
+            $_aOutput[ ] = $this->_getFieldOutputByLabel( 
73 73
                 $_sKey, 
74 74
                 $_sLabel, 
75 75
                 $aField
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         }
78 78
         
79 79
         // the repeatable field buttons will be replaced with this element.
80
-        $_aOutput[] = "<div class='repeatable-field-buttons'></div>";
80
+        $_aOutput[ ] = "<div class='repeatable-field-buttons'></div>";
81 81
         return implode( '', $_aOutput );
82 82
         
83 83
     }
@@ -96,27 +96,27 @@  discard block
 block discarded – undo
96 96
             $aField[ 'value' ]  = $this->getElementByLabel( $aField[ 'value' ], $sKey, $_bIsArray );
97 97
             $_aInputAttributes  = $_bIsArray
98 98
                 ? array(
99
-                        'name'  => $aField[ 'attributes' ][ 'name' ] . "[{$sKey}]",
100
-                        'id'    => $aField[ 'attributes' ][ 'id' ] . "_{$sKey}",
99
+                        'name'  => $aField[ 'attributes' ][ 'name' ]."[{$sKey}]",
100
+                        'id'    => $aField[ 'attributes' ][ 'id' ]."_{$sKey}",
101 101
                         'value' => $aField[ 'value' ],
102 102
                     ) 
103 103
                     + $aField[ 'attributes' ]
104 104
                 : $aField[ 'attributes' ];
105
-            $_aOutput           = array(
106
-                $this->getElementByLabel( $aField['before_label'], $sKey, $_bIsArray ),
105
+            $_aOutput = array(
106
+                $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $_bIsArray ),
107 107
                 "<div class='admin-page-framework-input-label-container {$_sClassSelector}'>",
108
-                    "<label for='" . $_aInputAttributes[ 'id' ] . "'>",
109
-                        $this->getElementByLabel( $aField['before_input'], $sKey, $_bIsArray ),
108
+                    "<label for='".$_aInputAttributes[ 'id' ]."'>",
109
+                        $this->getElementByLabel( $aField[ 'before_input' ], $sKey, $_bIsArray ),
110 110
                         $_sLabel 
111
-                            ? "<span class='admin-page-framework-input-label-string' style='min-width:" . $this->sanitizeLength( $aField['label_min_width'] ) . ";'>" 
111
+                            ? "<span class='admin-page-framework-input-label-string' style='min-width:".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>" 
112 112
                                     . $_sLabel
113 113
                                 . "</span>"
114 114
                             : '',
115
-                        "<input " . $this->getAttributes( $_aInputAttributes ) . " />",
116
-                        $this->getElementByLabel( $aField['after_input'], $sKey, $_bIsArray ),
115
+                        "<input ".$this->getAttributes( $_aInputAttributes )." />",
116
+                        $this->getElementByLabel( $aField[ 'after_input' ], $sKey, $_bIsArray ),
117 117
                     "</label>",
118 118
                 "</div>",
119
-                $this->getElementByLabel( $aField['after_label'], $sKey, $_bIsArray ),
119
+                $this->getElementByLabel( $aField[ 'after_label' ], $sKey, $_bIsArray ),
120 120
             );
121 121
             return implode( '', $_aOutput );
122 122
   
Please login to merge, or discard this patch.
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.
factory/_abstract/form/field_type/AdminPageFramework_FieldType_textarea.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -429,8 +429,8 @@  discard block
 block discarded – undo
429 429
     protected function getField( $aField ) {
430 430
 
431 431
         $_aOutput = array();
432
-        foreach( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) {
433
-            $_aOutput[] = $this->_getFieldOutputByLabel( 
432
+        foreach ( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) {
433
+            $_aOutput[ ] = $this->_getFieldOutputByLabel( 
434 434
                 $_sKey, 
435 435
                 $_sLabel, 
436 436
                 $aField
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
         }
439 439
         
440 440
         // the repeatable field buttons will be replaced with this element.
441
-        $_aOutput[] = "<div class='repeatable-field-buttons'></div>";
441
+        $_aOutput[ ] = "<div class='repeatable-field-buttons'></div>";
442 442
         return implode( '', $_aOutput );
443 443
         
444 444
     }
@@ -457,27 +457,27 @@  discard block
 block discarded – undo
457 457
             $aField[ 'rich' ]       = $this->getElementByLabel( $aField[ 'rich' ], $sKey, $_bIsArray );
458 458
             $aField[ 'attributes' ] = $_bIsArray
459 459
                 ? array(
460
-                        'name'  => $aField[ 'attributes' ][ 'name' ] . "[{$sKey}]",
461
-                        'id'    => $aField[ 'attributes' ][ 'id' ] . "_{$sKey}",
460
+                        'name'  => $aField[ 'attributes' ][ 'name' ]."[{$sKey}]",
461
+                        'id'    => $aField[ 'attributes' ][ 'id' ]."_{$sKey}",
462 462
                         'value' => $aField[ 'value' ],
463 463
                     ) 
464 464
                     + $aField[ 'attributes' ]
465 465
                 : $aField[ 'attributes' ];
466
-            $_aOutput           = array(
467
-                $this->getElementByLabel( $aField['before_label'], $sKey, $_bIsArray ),
466
+            $_aOutput = array(
467
+                $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $_bIsArray ),
468 468
                 "<div class='admin-page-framework-input-label-container {$_sClassSelector}'>",
469
-                    "<label for='" . $aField[ 'attributes' ][ 'id' ] . "'>",
470
-                        $this->getElementByLabel( $aField['before_input'], $sKey, $_bIsArray ),
469
+                    "<label for='".$aField[ 'attributes' ][ 'id' ]."'>",
470
+                        $this->getElementByLabel( $aField[ 'before_input' ], $sKey, $_bIsArray ),
471 471
                         $_sLabel 
472
-                            ? "<span class='admin-page-framework-input-label-string' style='min-width:" . $this->sanitizeLength( $aField['label_min_width'] ) . ";'>" 
472
+                            ? "<span class='admin-page-framework-input-label-string' style='min-width:".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>" 
473 473
                                     . $_sLabel
474 474
                                 . "</span>"
475 475
                             : '',
476 476
                         $this->_getEditor( $aField ),
477
-                        $this->getElementByLabel( $aField['after_input'], $sKey, $_bIsArray ),
477
+                        $this->getElementByLabel( $aField[ 'after_input' ], $sKey, $_bIsArray ),
478 478
                     "</label>",
479 479
                 "</div>",
480
-                $this->getElementByLabel( $aField['after_label'], $sKey, $_bIsArray ),
480
+                $this->getElementByLabel( $aField[ 'after_label' ], $sKey, $_bIsArray ),
481 481
             );
482 482
             return implode( '', $_aOutput );
483 483
   
@@ -490,31 +490,31 @@  discard block
 block discarded – undo
490 490
          */
491 491
         private function _getEditor( $aField ) {
492 492
                         
493
-            unset( $aField['attributes']['value'] );
493
+            unset( $aField[ 'attributes' ][ 'value' ] );
494 494
             
495 495
             // For no TinyMCE
496
-            if ( empty( $aField['rich'] ) || ! $this->isTinyMCESupported() ) {
497
-                return "<textarea " . $this->getAttributes( $aField['attributes'] ) . " >" // this method is defined in the base class
498
-                            . esc_textarea( $aField['value'] )
496
+            if ( empty( $aField[ 'rich' ] ) || !$this->isTinyMCESupported() ) {
497
+                return "<textarea ".$this->getAttributes( $aField[ 'attributes' ] )." >" // this method is defined in the base class
498
+                            . esc_textarea( $aField[ 'value' ] )
499 499
                         . "</textarea>";
500 500
             }
501 501
 
502 502
             // Rich editor
503 503
             ob_start();
504 504
             wp_editor( 
505
-                $aField['value'],
506
-                $aField['attributes']['id'],  
505
+                $aField[ 'value' ],
506
+                $aField[ 'attributes' ][ 'id' ],  
507 507
                 $this->uniteArrays( 
508
-                    ( array ) $aField['rich'],
508
+                    ( array ) $aField[ 'rich' ],
509 509
                     array(
510 510
                         'wpautop'           => true, // use wpautop?
511 511
                         'media_buttons'     => true, // show insert/upload button(s)
512
-                        'textarea_name'     => $aField['attributes']['name'],
513
-                        'textarea_rows'     => $aField['attributes']['rows'],
512
+                        'textarea_name'     => $aField[ 'attributes' ][ 'name' ],
513
+                        'textarea_rows'     => $aField[ 'attributes' ][ 'rows' ],
514 514
                         'tabindex'          => '',
515 515
                         'tabfocus_elements' => ':prev,:next', // the previous and next element ID to move the focus to when pressing the Tab key in TinyMCE
516 516
                         'editor_css'        => '', // intended for extra styles for both visual and Text editors buttons, needs to include the <style> tags, can use "scoped".
517
-                        'editor_class'      => $aField['attributes']['class'], // add extra class(es) to the editor textarea
517
+                        'editor_class'      => $aField[ 'attributes' ][ 'class' ], // add extra class(es) to the editor textarea
518 518
                         'teeny'             => false, // output the minimal editor config used in Press This
519 519
                         'dfw'               => false, // replace the default fullscreen with DFW (needs specific DOM elements and css)
520 520
                         'tinymce'           => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
             ob_end_clean();
527 527
             
528 528
             return $_sContent
529
-                . $this->_getScriptForRichEditor( $aField['attributes']['id'] );
529
+                . $this->_getScriptForRichEditor( $aField[ 'attributes' ][ 'id' ] );
530 530
             
531 531
         }
532 532
     
Please login to merge, or discard this patch.
_abstract/form/field_type/AdminPageFramework_WalkerTaxonomyChecklist.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -63,15 +63,15 @@  discard block
 block discarded – undo
63 63
      *  - use_desc_for_title    (boolean|int) default is 1 - Whether to use the category description as the title attribute. side note: the framework enables this by default.
64 64
      * @param       integer     $iCurrentObjectID
65 65
      */
66
-    function start_el( &$sOutput, $oTerm, $iDepth=0, $aArgs=array(), $iCurrentObjectID=0 ) {
66
+    function start_el( &$sOutput, $oTerm, $iDepth = 0, $aArgs = array(), $iCurrentObjectID = 0 ) {
67 67
        
68 68
         $aArgs = $aArgs + array(
69 69
             '_name_prefix'      => null,
70 70
             '_input_id_prefix'  => null,
71 71
             '_attributes'       => array(),
72 72
             '_selected_items'   => array(),
73
-            'taxonomy'          => null,    // parsed by the core function to perform the database query.
74
-            'disabled'          => null,    // not sure what this was for
73
+            'taxonomy'          => null, // parsed by the core function to perform the database query.
74
+            'disabled'          => null, // not sure what this was for
75 75
         );
76 76
         
77 77
         // Local variables
@@ -79,22 +79,22 @@  discard block
 block discarded – undo
79 79
         $_sTaxonomySlug  = empty( $aArgs[ 'taxonomy' ] ) 
80 80
             ? 'category' 
81 81
             : $aArgs[ 'taxonomy' ];
82
-        $_sID            = "{$aArgs['_input_id_prefix']}_{$_sTaxonomySlug}_{$_iID}";
82
+        $_sID            = "{$aArgs[ '_input_id_prefix' ]}_{$_sTaxonomySlug}_{$_iID}";
83 83
 
84 84
         // Post count
85
-        $_sPostCount     = $aArgs['show_post_count'] 
86
-            ? " <span class='font-lighter'>(" . $oTerm->count . ")</span>" 
85
+        $_sPostCount     = $aArgs[ 'show_post_count' ] 
86
+            ? " <span class='font-lighter'>(".$oTerm->count.")</span>" 
87 87
             : '';
88 88
         
89 89
         // Attributes
90 90
         $_aInputAttributes = isset( $_aInputAttributes[ $_iID ] ) 
91
-            ? $_aInputAttributes[ $_iID ] + $aArgs['_attributes']
92
-            : $aArgs['_attributes'];
91
+            ? $_aInputAttributes[ $_iID ] + $aArgs[ '_attributes' ]
92
+            : $aArgs[ '_attributes' ];
93 93
         $_aInputAttributes = array(
94 94
             'id'        => $_sID,
95 95
             'value'     => 1, // must be 1 because the index of zero exists so the index value cannot be assigned here.
96 96
             'type'      => 'checkbox',
97
-            'name'      => "{$aArgs['_name_prefix']}[{$_iID}]",
97
+            'name'      => "{$aArgs[ '_name_prefix' ]}[{$_iID}]",
98 98
             'checked'   => in_array( $_iID, ( array ) $aArgs[ '_selected_items' ] )
99 99
                 ? 'checked' 
100 100
                 : null,
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
           + array(
103 103
             'class'     => null,
104 104
         );
105
-        $_aInputAttributes['class'] .= ' apf_checkbox';
105
+        $_aInputAttributes[ 'class' ] .= ' apf_checkbox';
106 106
         
107 107
         $_aLiTagAttributes = array(
108 108
             'id'        => "list-{$_sID}",
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
         
113 113
         // Output - the variable is by reference so the modification takes effect
114 114
         $sOutput .= "\n"
115
-            . "<li " . AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ) . ">" 
115
+            . "<li ".AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ).">" 
116 116
                 . "<label for='{$_sID}' class='taxonomy-checklist-label'>"
117
-                    . "<input value='0' type='hidden' name='" . $_aInputAttributes[ 'name' ] . "' class='apf_checkbox' />"
118
-                    . "<input " . AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes ) . " />"
117
+                    . "<input value='0' type='hidden' name='".$_aInputAttributes[ 'name' ]."' class='apf_checkbox' />"
118
+                    . "<input ".AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes )." />"
119 119
                     . esc_html( apply_filters( 'the_category', $oTerm->name ) ) 
120 120
                     . $_sPostCount
121 121
                 . "</label>";    
Please login to merge, or discard this patch.
factory/_abstract/form/notice/AdminPageFramework_Form___SubmitNotice.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
      * @param       string      $sType If empty, the method will check if a message exists in all types. Otherwise, it checks the existence of a message of the specified type.
33 33
      * @return      boolean     True if a setting notice is set; otherwise, false.
34 34
      */
35
-    public function hasNotice( $sType='' ) {
35
+    public function hasNotice( $sType = '' ) {
36 36
                 
37
-        if ( ! $sType ) {
37
+        if ( !$sType ) {
38 38
             return ( bool ) count( self::$_aNotices );
39 39
         }
40 40
         
41 41
         // Check if there is a message of the type.
42
-        foreach( self::$_aNotices as $_aNotice ) {
42
+        foreach ( self::$_aNotices as $_aNotice ) {
43 43
             $_sClassAttribute = $this->getElement( 
44 44
                 $_aNotice, 
45 45
                 array( 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @param        boolean     $bOverride      (optional) If true, only one message will be shown in the next page load. false: do not override when there is a message of the same id. true: override the previous one.
79 79
      * @return       void
80 80
      */
81
-    public function set( $sMessage, $sType='error', $asAttributes=array(), $bOverride=true ) {
81
+    public function set( $sMessage, $sType = 'error', $asAttributes = array(), $bOverride = true ) {
82 82
         
83 83
         // If the array is empty, shecule the task of saving the array at shutdown.
84 84
         if ( empty( self::$_aNotices ) ) {
@@ -88,19 +88,19 @@  discard block
 block discarded – undo
88 88
         $_sID = md5( trim( $sMessage ) );
89 89
             
90 90
         // If the override is false and a message is already set, do not add.
91
-        if ( ! $bOverride && isset( self::$_aNotices[ $_sID ] ) ) {
91
+        if ( !$bOverride && isset( self::$_aNotices[ $_sID ] ) ) {
92 92
             return;
93 93
         }
94 94
 
95 95
         $_aAttributes = $this->getAsArray( $asAttributes );
96
-        if ( is_string( $asAttributes ) && ! empty( $asAttributes ) ) {
96
+        if ( is_string( $asAttributes ) && !empty( $asAttributes ) ) {
97 97
             $_aAttributes[ 'id' ] = $asAttributes;
98 98
         }
99 99
         self::$_aNotices[ $_sID ] = array(
100 100
             'sMessage'      => $sMessage,
101 101
             'aAttributes'   => $_aAttributes + array(
102 102
                 'class'     => $sType,
103
-                'id'        => 'form_submit_notice_' . $_sID,
103
+                'id'        => 'form_submit_notice_'.$_sID,
104 104
             ),
105 105
         );
106 106
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 return; 
121 121
             }
122 122
             $this->setTransient( 
123
-                'apf_notices_' . get_current_user_id(), 
123
+                'apf_notices_'.get_current_user_id(), 
124 124
                 self::$_aNotices
125 125
             );
126 126
         }        
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         $this->deleteTransient( "apf_notices_{$_iUserID}" );
143 143
     
144 144
         // By setting false to the 'settings-notice' key, it's possible to disable the notifications set with the framework.
145
-        if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) { 
145
+        if ( isset( $_GET[ 'settings-notice' ] ) && !$_GET[ 'settings-notice' ] ) { 
146 146
             return; 
147 147
         }
148 148
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
          * @return      void
117 117
          */
118 118
         public function _replyToSaveNotices() {
119
-            if ( empty( self::$_aNotices ) ) { 
119
+            if ( empty( self::$_aNotices ) ) {
120 120
                 return; 
121 121
             }
122 122
             $this->setTransient( 
@@ -136,13 +136,13 @@  discard block
 block discarded – undo
136 136
         
137 137
         $_iUserID  = get_current_user_id();
138 138
         $_aNotices = $this->getTransient( "apf_notices_{$_iUserID}" );
139
-        if ( false === $_aNotices ) { 
139
+        if ( false === $_aNotices ) {
140 140
             return; 
141 141
         }
142 142
         $this->deleteTransient( "apf_notices_{$_iUserID}" );
143 143
     
144 144
         // By setting false to the 'settings-notice' key, it's possible to disable the notifications set with the framework.
145
-        if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) { 
145
+        if ( isset( $_GET[ 'settings-notice' ] ) && ! $_GET[ 'settings-notice' ] ) {
146 146
             return; 
147 147
         }
148 148
         
Please login to merge, or discard this patch.