Completed
Branch dev (16db98)
by
unknown
05:13
created
AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                     'class_name'           => 'AceCustomFieldType',
89 89
                     'label'                => __( 'ACE', 'admin-page-framework-loader' ),
90 90
                     'description'          => __( 'provides code syntax highlighting in a text area field.', 'admin-page-framework-loader' ),
91
-                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/ace-custom-field-type',
91
+                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/ace-custom-field-type',
92 92
                     'archive_file_path'    => 'custom-field-types/ace-custom-field-type/AceCustomFieldType.php',
93 93
                     'archive_dir_path'     => 'custom-field-types/ace-custom-field-type',
94 94
                     'text_domain'          => 'admin-page-framework',
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                     'class_name'           => 'GitHubCustomFieldType',
98 98
                     'label'                => __( 'GitHub Buttons', 'admin-page-framework-loader' ),
99 99
                     'description'          => __( 'allows you to display GitHub buttons in a field.', 'admin-page-framework-loader' ),
100
-                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath . '/include/library/github-custom-field-type',
100
+                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath.'/include/library/github-custom-field-type',
101 101
                     'archive_file_path'    => 'custom-field-types/github-custom-field-type/GitHubCustomFieldType.php',
102 102
                     'archive_dir_path'     => 'custom-field-types/github-custom-field-type',
103 103
                     'text_domain'          => 'admin-page-framework',
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                     'class_name'           => 'PathCustomFieldType',
107 107
                     'label'                => __( 'Path', 'admin-page-framework-loader' ),
108 108
                     'description'          => __( 'allows the user to select a file path on the server.', 'admin-page-framework-loader' ),
109
-                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/path-custom-field-type',
109
+                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/path-custom-field-type',
110 110
                     'archive_file_path'    => 'custom-field-types/path-custom-field-type/PathCustomFieldType.php',
111 111
                     'archive_dir_path'     => 'custom-field-types/path-custom-field-type',
112 112
                     'text_domain'          => 'admin-page-framework',
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                     'class_name'           => 'ToggleCustomFieldType',
116 116
                     'label'                => __( 'Toggle', 'admin-page-framework-loader' ),
117 117
                     'description'          => __( 'allows the user to switch a button.', 'admin-page-framework-loader' ),
118
-                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/toggle-custom-field-type',
118
+                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/toggle-custom-field-type',
119 119
                     'archive_file_path'    => 'custom-field-types/toggle-custom-field-type/ToggleCustomFieldType.php',
120 120
                     'archive_dir_path'     => 'custom-field-types/toggle-custom-field-type',
121 121
                     'text_domain'          => 'admin-page-framework',
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                     'class_name'           => 'NoUISliderCustomFieldType',
125 125
                     'label'                => __( 'NoUISlider (Range Slider)', 'admin-page-framework-loader' ),
126 126
                     'description'          => __( 'allows the user to set values in ranges.', 'admin-page-framework-loader' ),
127
-                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/nouislider-custom-field-type',
127
+                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/nouislider-custom-field-type',
128 128
                     'archive_file_path'    => 'custom-field-types/nouislider-custom-field-type/NoUISliderCustomFieldType.php',
129 129
                     'archive_dir_path'     => 'custom-field-types/nouislider-custom-field-type',
130 130
                     'text_domain'          => 'admin-page-framework',
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                     'class_name'           => 'Select2CustomFieldType',
134 134
                     'label'                => __( 'Select2', 'admin-page-framework-loader' ),
135 135
                     'description'          => __( 'allows the user to select items with autocomplete from a list which can be populated with AJAX.', 'admin-page-framework-loader' ),
136
-                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/select2-custom-field-type',
136
+                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/select2-custom-field-type',
137 137
                     'archive_file_path'    => 'custom-field-types/select2-custom-field-type/Select2CustomFieldType.php',
138 138
                     'archive_dir_path'     => 'custom-field-types/select2-custom-field-type',
139 139
                     'text_domain'          => 'admin-page-framework',
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                     'class_name'           => 'PostTypeTaxonomyCustomFieldType',
143 143
                     'label'                => __( 'Post Type Taxonomy', 'admin-page-framework-loader' ),
144 144
                     'description'          => __( 'allows the user to select taxonomy terms of selected post types.', 'admin-page-framework-loader' ),
145
-                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/post_type_taxonomy_field-type',
145
+                    'directory_path'       => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/post_type_taxonomy_field-type',
146 146
                     'archive_file_path'    => 'custom-field-types/post_type_taxonomy_field-type/PostTypeTaxonomyCustomFieldType.php',
147 147
                     'archive_dir_path'     => 'custom-field-types/post_type_taxonomy_field-type',
148 148
                     'text_domain'          => 'admin-page-framework',
@@ -151,13 +151,13 @@  discard block
 block discarded – undo
151 151
                 
152 152
             // Let third-party scripts add custom field types.
153 153
             $this->aCustomFieldTypes = apply_filters(
154
-                AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_custom_field_types',
154
+                AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_custom_field_types',
155 155
                 $this->aCustomFieldTypes
156 156
             );                    
157 157
             
158
-            foreach( $this->aCustomFieldTypes as $_sKey => $_aCustomFieldType ) {
158
+            foreach ( $this->aCustomFieldTypes as $_sKey => $_aCustomFieldType ) {
159 159
                 $this->aCustomFieldTypeLabels[ $_sKey ] = $_aCustomFieldType[ 'label' ]
160
-                    . ' - <span class="description">' . $_aCustomFieldType[ 'description' ] . '</span>';
160
+                    . ' - <span class="description">'.$_aCustomFieldType[ 'description' ].'</span>';
161 161
             }
162 162
      
163 163
         }
@@ -173,10 +173,10 @@  discard block
 block discarded – undo
173 173
 
174 174
                 // Check the file extension.
175 175
                 $_aAllowedExtensions = apply_filters(
176
-                    AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_allowed_file_extensions',
176
+                    AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_allowed_file_extensions',
177 177
                     array( 'php', 'css', 'js' )
178 178
                 );                
179
-                if ( ! in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions ) ) {
179
+                if ( !in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions ) ) {
180 180
                     return $sFileContents;
181 181
                 }            
182 182
                 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
                 private function _getModifiedInclusionList( $sFileContents ) {
207 207
                     return str_replace(
208 208
                         ');', // search
209
-                        $this->_getClassListOfCustomFieldTypes() . ');', // replace - @todo insert the selected class list here
209
+                        $this->_getClassListOfCustomFieldTypes().');', // replace - @todo insert the selected class list here
210 210
                         $sFileContents // subject
211 211
                     );
212 212
                 }
@@ -223,18 +223,18 @@  discard block
 block discarded – undo
223 223
                             $_POST,
224 224
                             array( 
225 225
                                 $this->oFactory->oProp->sOptionKey, 
226
-                                'generator',    // section id
226
+                                'generator', // section id
227 227
                                 'class_prefix'  // field id
228 228
                             ),
229 229
                             ''
230 230
                         );
231 231
                         $_aOutput = array();
232
-                        foreach( $_aCheckedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) {
233
-                            $_aOutput[] = '    "' . $_sClassPrefix . $_sClassName . '"'
232
+                        foreach ( $_aCheckedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) {
233
+                            $_aOutput[ ] = '    "'.$_sClassPrefix.$_sClassName.'"'
234 234
                                 . ' => ' 
235
-                                . 'AdminPageFramework_Registry::$sDirPath . ' . '"/' . ltrim( $_aCustomFieldType[ 'archive_file_path' ], '/' ) . '",';
235
+                                . 'AdminPageFramework_Registry::$sDirPath . '.'"/'.ltrim( $_aCustomFieldType[ 'archive_file_path' ], '/' ).'",';
236 236
                         }
237
-                        return implode( PHP_EOL, $_aOutput ) . PHP_EOL;
237
+                        return implode( PHP_EOL, $_aOutput ).PHP_EOL;
238 238
                     
239 239
                     }
240 240
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                         $this->aCustomFieldTypes // ArchiveFilePaths
253 253
                     );
254 254
                     $_aArchiveFilePaths = array();
255
-                    foreach( $_aSelectedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) {
255
+                    foreach ( $_aSelectedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) {
256 256
                         $_aArchiveFilePaths[ $_sClassName ] = $this->oFactory->oUtil->getElement(
257 257
                             $_aCustomFieldType,
258 258
                             'archive_file_path',
@@ -304,17 +304,17 @@  discard block
 block discarded – undo
304 304
                         array( $sParsingClassName, 'text_domain' )
305 305
                     );
306 306
                     if ( $_sFieldTypeTextDomain ) {                        
307
-                        $_aSearches[] = $_sFieldTypeTextDomain;
308
-                        $_aReplaces[] = $_sUserTextDomain;
307
+                        $_aSearches[ ] = $_sFieldTypeTextDomain;
308
+                        $_aReplaces[ ] = $_sUserTextDomain;
309 309
                     }
310 310
                     
311
-                    $_aSearches[] = 'admin-page-framework';
312
-                    $_aReplaces[] = $_sUserTextDomain;
311
+                    $_aSearches[ ] = 'admin-page-framework';
312
+                    $_aReplaces[ ] = $_sUserTextDomain;
313 313
                     
314 314
                     // Return the converted string.
315 315
                     return str_replace(
316
-                        $_aSearches,    // search
317
-                        $_aReplaces,    // replace
316
+                        $_aSearches, // search
317
+                        $_aReplaces, // replace
318 318
                         $sFileContents  // subject
319 319
                     );
320 320
                     
@@ -332,8 +332,8 @@  discard block
 block discarded – undo
332 332
                         );
333 333
                                                 
334 334
                         return preg_replace(
335
-                            $this->_getClassPrefixRegexPatterns( $_aSelectedFieldTypeClassNames ),    // search
336
-                            $this->_getClassPrefixRegexReplacements( $_aSelectedFieldTypeClassNames ),    // replace
335
+                            $this->_getClassPrefixRegexPatterns( $_aSelectedFieldTypeClassNames ), // search
336
+                            $this->_getClassPrefixRegexReplacements( $_aSelectedFieldTypeClassNames ), // replace
337 337
                             $sFileContents  // subject
338 338
                         );
339 339
                         
@@ -346,8 +346,8 @@  discard block
 block discarded – undo
346 346
                         private function _getClassPrefixRegexPatterns( array $aSelectedFieldTypeClassNames ) {
347 347
 
348 348
                             $_aPregSearches = array();
349
-                            foreach( $aSelectedFieldTypeClassNames as $_sClassName ) {
350
-                                $_aPregSearches[] = '/(?<=[^a-zA-Z0-9])(' . $_sClassName . ')/';
349
+                            foreach ( $aSelectedFieldTypeClassNames as $_sClassName ) {
350
+                                $_aPregSearches[ ] = '/(?<=[^a-zA-Z0-9])('.$_sClassName.')/';
351 351
                             }
352 352
                             return $_aPregSearches;
353 353
                         
@@ -359,9 +359,9 @@  discard block
 block discarded – undo
359 359
                          */
360 360
                         private function _getClassPrefixRegexReplacements( array $aSelectedFieldTypeClassNames ) {
361 361
 
362
-                            $_aPrefixedClassNames          = $aSelectedFieldTypeClassNames;
362
+                            $_aPrefixedClassNames = $aSelectedFieldTypeClassNames;
363 363
                             array_walk(
364
-                                $_aPrefixedClassNames,  // passed by reference
364
+                                $_aPrefixedClassNames, // passed by reference
365 365
                                 array( $this, '_replyToSetPrefix' ),
366 366
                                 $this->oFactory->oUtil->getElement(
367 367
                                     $_POST,
@@ -382,8 +382,8 @@  discard block
 block discarded – undo
382 382
                              * @callback    function    array_walk
383 383
                              * @return      string
384 384
                              */
385
-                            public function _replyToSetPrefix( &$sClassName, $sKey, $sPrefix='' ) {
386
-                                $sClassName = $sPrefix . '$0';
385
+                            public function _replyToSetPrefix( &$sClassName, $sKey, $sPrefix = '' ) {
386
+                                $sClassName = $sPrefix.'$0';
387 387
                             }
388 388
                                     
389 389
  
@@ -404,12 +404,12 @@  discard block
 block discarded – undo
404 404
              */
405 405
             public function replyToSetAdditionalDirectoriesForGenerator( $aDirPaths ) {
406 406
                                 
407
-                $_aCheckedCustomFieldTypes        = $this->_getSelectedCustomFieldTypes(
407
+                $_aCheckedCustomFieldTypes = $this->_getSelectedCustomFieldTypes(
408 408
                     $this->aCustomFieldTypes
409 409
                 );
410 410
                 
411 411
                 $_aDirPathInfo = array();
412
-                foreach( $_aCheckedCustomFieldTypes as $_sKey => $_aCheckedCustomFieldType ) {
412
+                foreach ( $_aCheckedCustomFieldTypes as $_sKey => $_aCheckedCustomFieldType ) {
413 413
                     
414 414
                     $_sArchiveDirPath = $this->oFactory->oUtil->getElement( $_aCheckedCustomFieldType, 'archive_dir_path' );
415 415
                     $_sSourceDirPath  = $this->oFactory->oUtil->getElement( $_aCheckedCustomFieldType, 'directory_path' );
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
                  * @return      array       The array keys of the checked items.
426 426
                  * @since       3.6.0
427 427
                  */
428
-                private function _getSelectedCustomFieldTypes( array $aSubject=array() ) {
428
+                private function _getSelectedCustomFieldTypes( array $aSubject = array() ) {
429 429
                     
430 430
                     $_aCheckedCustomFieldTypes = $this->oFactory->oUtil->getElementAsArray(
431 431
                         $_POST,
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_checkbox.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
      * Defines the default key-values of this field type. 
78 78
      */
79 79
     protected $aDefaultKeys = array(
80
-        'select_all_button'     => false,        // 3.3.0+   to change the label, set the label here
81
-        'select_none_button'    => false,        // 3.3.0+   to change the label, set the label here
82
-        'save_unchecked'        => true,        // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
80
+        'select_all_button'     => false, // 3.3.0+   to change the label, set the label here
81
+        'select_none_button'    => false, // 3.3.0+   to change the label, set the label here
82
+        'save_unchecked'        => true, // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
83 83
     );
84 84
         
85 85
     /**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */ 
92 92
     protected function getScripts() {
93 93
         new AdminPageFramework_Form_View___Script_CheckboxSelector;
94
-        $_sClassSelectorSelectAll  = $this->_getSelectButtonClassSelectors( 
94
+        $_sClassSelectorSelectAll = $this->_getSelectButtonClassSelectors( 
95 95
             $this->aFieldTypeSlugs, 
96 96
             'select_all_button' // data attribute
97 97
         );
@@ -118,14 +118,14 @@  discard block
 block discarded – undo
118 118
          * @return      string
119 119
          * @internal
120 120
          */
121
-        private function _getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute='select_all_button' ) {
121
+        private function _getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute = 'select_all_button' ) {
122 122
             
123 123
             $_aClassSelectors = array();
124 124
             foreach ( $aFieldTypeSlugs as $_sSlug ) {
125
-                if ( ! is_scalar( $_sSlug ) ) {
125
+                if ( !is_scalar( $_sSlug ) ) {
126 126
                     continue;
127 127
                 }
128
-                $_aClassSelectors[] = '.admin-page-framework-checkbox-container-' . $_sSlug . "[data-{$sDataAttribute}]";
128
+                $_aClassSelectors[ ] = '.admin-page-framework-checkbox-container-'.$_sSlug."[data-{$sDataAttribute}]";
129 129
             }
130 130
             return implode( ',', $_aClassSelectors );
131 131
             
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
 
187 187
         $_aOutput       = array();
188 188
         $_bIsMultiple   = is_array( $aField[ 'label' ] );
189
-        foreach( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) {
190
-            $_aOutput[] = $this->_getEachCheckboxOutput( 
189
+        foreach ( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) {
190
+            $_aOutput[ ] = $this->_getEachCheckboxOutput( 
191 191
                 $aField, 
192 192
                 $_bIsMultiple 
193 193
                     ? $_sKey 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 $_sLabel
196 196
             );
197 197
         }        
198
-        return "<div " . $this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ) . ">"
198
+        return "<div ".$this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ).">"
199 199
                 . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element.
200 200
                 . implode( PHP_EOL, $_aOutput )
201 201
             . "</div>";
@@ -210,12 +210,12 @@  discard block
 block discarded – undo
210 210
          */
211 211
         protected function _getCheckboxContainerAttributes( array $aField ) {
212 212
             return array(
213
-                'class'                     => 'admin-page-framework-checkbox-container-' . $aField[ 'type' ],
213
+                'class'                     => 'admin-page-framework-checkbox-container-'.$aField[ 'type' ],
214 214
                 'data-select_all_button'    => $aField[ 'select_all_button' ] 
215
-                    ? ( ! is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] )
215
+                    ? ( !is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] )
216 216
                     : null,
217 217
                 'data-select_none_button'   => $aField[ 'select_none_button' ] 
218
-                    ? ( ! is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] )
218
+                    ? ( !is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] )
219 219
                     : null,
220 220
             );            
221 221
         }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         private function _getEachCheckboxOutput( array $aField, $sKey, $sLabel ) {
231 231
 
232 232
             $_aInputAttributes = array(
233
-                'data-key'  => $sKey,   // 3.8.8+ For the `post_type_taxonomy` field type.
233
+                'data-key'  => $sKey, // 3.8.8+ For the `post_type_taxonomy` field type.
234 234
             ) + $aField[ 'attributes' ];
235 235
             $_oCheckbox = new AdminPageFramework_Input_checkbox( 
236 236
                 $_aInputAttributes,
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
             $_oCheckbox->setAttributesByKey( $sKey );
242 242
             $_oCheckbox->addClass( $this->_sCheckboxClassSelector );
243 243
             return $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $aField[ 'label' ] )
244
-                . "<div " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-checkbox-label' ) . ">" 
245
-                    . "<label " . $this->getAttributes( 
244
+                . "<div ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-checkbox-label' ).">" 
245
+                    . "<label ".$this->getAttributes( 
246 246
                         array(
247 247
                             'for'   => $_oCheckbox->getAttribute( 'id' ),
248 248
                             'class' => $_oCheckbox->getAttribute( 'disabled' )
Please login to merge, or discard this patch.
_common/form/field_type/AdminPageFramework_WalkerTaxonomyChecklist.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -63,16 +63,16 @@  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
75
-            '_save_unchecked'   => true,    // 3.8.8+
73
+            'taxonomy'          => null, // parsed by the core function to perform the database query.
74
+            'disabled'          => null, // not sure what this was for
75
+            '_save_unchecked'   => true, // 3.8.8+
76 76
         );
77 77
         
78 78
         // Local variables
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         // Post count
86 86
         $_sPostCount     = $aArgs[ 'show_post_count' ] 
87
-            ? " <span class='font-lighter'>(" . $oTerm->count . ")</span>" 
87
+            ? " <span class='font-lighter'>(".$oTerm->count.")</span>" 
88 88
             : '';
89 89
         
90 90
         // Attributes
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
           + array(
104 104
             'class'     => null,
105 105
         );
106
-        $_aInputAttributes['class'] .= ' apf_checkbox';
106
+        $_aInputAttributes[ 'class' ] .= ' apf_checkbox';
107 107
         
108 108
         $_aLiTagAttributes = array(
109 109
             'id'        => "list-{$_sID}",
@@ -112,15 +112,15 @@  discard block
 block discarded – undo
112 112
         );
113 113
 
114 114
         $_sHiddenInputForUnchecked = $aArgs[ '_save_unchecked' ]
115
-            ? "<input value='0' type='hidden' name='" . $_aInputAttributes[ 'name' ] . "' class='apf_checkbox' />"
115
+            ? "<input value='0' type='hidden' name='".$_aInputAttributes[ 'name' ]."' class='apf_checkbox' />"
116 116
             : '';
117 117
             
118 118
         // Output - the variable is by reference so the modification takes effect
119 119
         $sOutput .= "\n"
120
-            . "<li " . AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ) . ">" 
120
+            . "<li ".AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ).">" 
121 121
                 . "<label for='{$_sID}' class='taxonomy-checklist-label'>"
122 122
                     . $_sHiddenInputForUnchecked    // 3.8.8+
123
-                    . "<input " . AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes ) . " />"
123
+                    . "<input ".AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes )." />"
124 124
                     . esc_html( apply_filters( 'the_category', $oTerm->name ) ) 
125 125
                     . $_sPostCount
126 126
                 . "</label>";    
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_posttype.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     /**
82 82
      * Defines the field type slugs used for this field type.
83 83
      */
84
-    public $aFieldTypeSlugs = array( 'posttype', );
84
+    public $aFieldTypeSlugs = array( 'posttype',);
85 85
     
86 86
     /**
87 87
      * Defines the default key-values of this field type. 
@@ -89,20 +89,20 @@  discard block
 block discarded – undo
89 89
      * @remark $_aDefaultKeys holds shared default key-values defined in the base class.
90 90
      */
91 91
     protected $aDefaultKeys = array(
92
-        'slugs_to_remove'       => null,    // the default array will be assigned in the rendering method.
92
+        'slugs_to_remove'       => null, // the default array will be assigned in the rendering method.
93 93
         /** 
94 94
          * Accepts query arguments. For the argument specification, see the arg parameter of get_post_types() function.
95 95
          * See: http://codex.wordpress.org/Function_Reference/get_post_types#Parameters
96 96
          */
97
-        'query'                 => array(),  // 3.2.1+
98
-        'operator'              => 'and',    // 3.2.1+ either 'and' or 'or'
97
+        'query'                 => array(), // 3.2.1+
98
+        'operator'              => 'and', // 3.2.1+ either 'and' or 'or'
99 99
         'attributes'            => array(
100 100
             'size'      => 30,
101 101
             'maxlength' => 400,
102 102
         ),    
103
-        'select_all_button'     => true,     // 3.3.0+   to change the label, set the label here
104
-        'select_none_button'    => true,     // 3.3.0+   to change the label, set the label here        
105
-        'save_unchecked'        => true,     // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
103
+        'select_all_button'     => true, // 3.3.0+   to change the label, set the label here
104
+        'select_none_button'    => true, // 3.3.0+   to change the label, set the label here        
105
+        'save_unchecked'        => true, // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
106 106
     );
107 107
     protected $aDefaultRemovingPostTypeSlugs = array(
108 108
         'revision', 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */ 
120 120
     protected function getStyles() {
121 121
         $_sParentStyles = parent::getStyles();
122
-        return $_sParentStyles . <<<CSSRULES
122
+        return $_sParentStyles.<<<CSSRULES
123 123
 /* Posttype Field Type */
124 124
 .admin-page-framework-field input[type='checkbox'] {
125 125
     margin-right: 0.5em;
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
      */
147 147
     protected function getField( $aField ) {
148 148
 
149
-        $this->_sCheckboxClassSelector = '';    // disable the checkbox class selector.
149
+        $this->_sCheckboxClassSelector = ''; // disable the checkbox class selector.
150 150
         $aField[ 'label' ] = $this->_getPostTypeArrayForChecklist( 
151 151
             isset( $aField[ 'slugs_to_remove' ] ) 
152 152
                 ? $this->getAsArray( $aField[ 'slugs_to_remove' ] ) 
153
-                : $this->aDefaultRemovingPostTypeSlugs,    // slugs to remove
153
+                : $this->aDefaultRemovingPostTypeSlugs, // slugs to remove
154 154
             $aField[ 'query' ],
155 155
             $aField[ 'operator' ]
156 156
         );
@@ -171,11 +171,11 @@  discard block
 block discarded – undo
171 171
          * @return  array   The array holding the elements of installed post types' labels and their slugs except the specified expluding post types.
172 172
          * @internal
173 173
          */ 
174
-        private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs=array(), $sOperator='and' ) {
174
+        private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs = array(), $sOperator = 'and' ) {
175 175
             
176 176
             $_aPostTypes = array();
177
-            foreach( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) {
178
-                if (  isset( $_oPostType->name, $_oPostType->label ) ) {
177
+            foreach ( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) {
178
+                if ( isset( $_oPostType->name, $_oPostType->label ) ) {
179 179
                     $_aPostTypes[ $_oPostType->name ] = $_oPostType->label;
180 180
                 }
181 181
             }
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_taxonomy.php 2 patches
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      * Defines the field type slugs used for this field type.
120 120
      * @var     array
121 121
      */
122
-    public $aFieldTypeSlugs = array( 'taxonomy', );
122
+    public $aFieldTypeSlugs = array( 'taxonomy',);
123 123
     
124 124
     /**
125 125
      * Defines the default key-values of this field type. 
@@ -128,41 +128,41 @@  discard block
 block discarded – undo
128 128
      * @var     array
129 129
      */
130 130
     protected $aDefaultKeys = array(
131
-        'taxonomy_slugs'        => 'category',      // (array|string) This is for the taxonomy field type.
132
-        'height'                => '250px',         // the tab box height
133
-        'width'                 => null,            // 3.5.7.2+ the tab box width
134
-        'max_width'             => '100%',          // for the taxonomy checklist field type, since 2.1.1.     
135
-        'show_post_count'       => true,            // (boolean) 3.2.0+ whether or not the post count associated with the term should be displayed or not.
131
+        'taxonomy_slugs'        => 'category', // (array|string) This is for the taxonomy field type.
132
+        'height'                => '250px', // the tab box height
133
+        'width'                 => null, // 3.5.7.2+ the tab box width
134
+        'max_width'             => '100%', // for the taxonomy checklist field type, since 2.1.1.     
135
+        'show_post_count'       => true, // (boolean) 3.2.0+ whether or not the post count associated with the term should be displayed or not.
136 136
         'attributes'            => array(),    
137
-        'select_all_button'     => true,            // (boolean|string) 3.3.0+ to change the label, set the label here
138
-        'select_none_button'    => true,            // (boolean|string) 3.3.0+ to change the label, set the label here                
139
-        'label_no_term_found'   => null,            // (string) 3.3.2+  The label to display when no term is found. null needs to be set here as the default value will be assigned in the field output method.
140
-        'label_list_title'      => '',              // (string) 3.3.2+ The heading title string for a term list. Default: `''`. Insert an HTML custom string right before the list starts.
137
+        'select_all_button'     => true, // (boolean|string) 3.3.0+ to change the label, set the label here
138
+        'select_none_button'    => true, // (boolean|string) 3.3.0+ to change the label, set the label here                
139
+        'label_no_term_found'   => null, // (string) 3.3.2+  The label to display when no term is found. null needs to be set here as the default value will be assigned in the field output method.
140
+        'label_list_title'      => '', // (string) 3.3.2+ The heading title string for a term list. Default: `''`. Insert an HTML custom string right before the list starts.
141 141
         'query'                 => array(       // (array)  3.3.2+ Defines the default query argument.
142 142
             // see the arguments of the get_category() function: http://codex.wordpress.org/Function_Reference/get_categories
143 143
             // see the argument of the get_terms() function: http://codex.wordpress.org/Function_Reference/get_terms        
144 144
             'child_of'          => 0,
145 145
             'parent'            => '',
146
-            'orderby'           => 'name',      // (string) 'ID' or 'term_id' or 'name'
147
-            'order'             => 'ASC',       // (string) 'ASC' or 'DESC'
148
-            'hide_empty'        => false,       // (boolean) whether to show the terms with no post associated. Default: false
149
-            'hierarchical'      => true,        // (boolean) whether to show the terms as a hierarchical tree.
150
-            'number'            => '',          // (integer) The maximum number of the terms to show.
151
-            'pad_counts'        => false,       // (boolean) whether to sum up the post counts with the child post counts.
152
-            'exclude'           => array(),     // (string) Comma separated term IDs to exclude from the list. for example `1` will remove the 'Uncategorized' category from the list.
146
+            'orderby'           => 'name', // (string) 'ID' or 'term_id' or 'name'
147
+            'order'             => 'ASC', // (string) 'ASC' or 'DESC'
148
+            'hide_empty'        => false, // (boolean) whether to show the terms with no post associated. Default: false
149
+            'hierarchical'      => true, // (boolean) whether to show the terms as a hierarchical tree.
150
+            'number'            => '', // (integer) The maximum number of the terms to show.
151
+            'pad_counts'        => false, // (boolean) whether to sum up the post counts with the child post counts.
152
+            'exclude'           => array(), // (string) Comma separated term IDs to exclude from the list. for example `1` will remove the 'Uncategorized' category from the list.
153 153
             'exclude_tree'      => array(), 
154
-            'include'           => array(),     // (string) Comma separated term IDs to include in the list.
154
+            'include'           => array(), // (string) Comma separated term IDs to include in the list.
155 155
             'fields'            => 'all', 
156 156
             'slug'              => '', 
157 157
             'get'               => '', 
158 158
             'name__like'        => '',
159 159
             'description__like' => '',
160 160
             'offset'            => '', 
161
-            'search'            => '',          // (string) The search keyword to get the term with.
161
+            'search'            => '', // (string) The search keyword to get the term with.
162 162
             'cache_domain'      => 'core',
163 163
         ),
164
-        'queries'   => array(),         // (optional, array) 3.3.2+  Sets a query argument for each taxonomy. The array key must be the taxonomy slug and the value is the query argument array.
165
-        'save_unchecked'        => true,        // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
164
+        'queries'   => array(), // (optional, array) 3.3.2+  Sets a query argument for each taxonomy. The array key must be the taxonomy slug and the value is the query argument array.
165
+        'save_unchecked'        => true, // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
166 166
     );
167 167
     
168 168
     /**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 
193 193
         $_aJSArray = json_encode( $this->aFieldTypeSlugs );
194 194
         
195
-        return parent::getScripts() . 
195
+        return parent::getScripts(). 
196 196
         // return 
197 197
 <<<JAVASCRIPTS
198 198
 /* For tabs */
@@ -413,22 +413,22 @@  discard block
 block discarded – undo
413 413
         // Parse
414 414
         $_aTabs         = array();
415 415
         $_aCheckboxes   = array();      
416
-        foreach( $this->getAsArray( $aField[ 'taxonomy_slugs' ] ) as $_isKey => $_sTaxonomySlug ) {
416
+        foreach ( $this->getAsArray( $aField[ 'taxonomy_slugs' ] ) as $_isKey => $_sTaxonomySlug ) {
417 417
             $_aAssociatedDataAttributes = $this->_getDataAttributesOfAssociatedPostTypes( 
418 418
                 $_sTaxonomySlug, 
419 419
                 $this->_getPostTypesByTaxonomySlug( $_sTaxonomySlug )
420 420
             );
421
-            $_aTabs[]                   = $this->_getTaxonomyTab( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes );
422
-            $_aCheckboxes[]             = $this->_getTaxonomyCheckboxes( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes );
421
+            $_aTabs[ ]                   = $this->_getTaxonomyTab( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes );
422
+            $_aCheckboxes[ ]             = $this->_getTaxonomyCheckboxes( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes );
423 423
         }
424 424
 
425 425
         // Output
426
-        return "<div id='tabbox-{$aField['field_id']}' class='tab-box-container categorydiv' style='max-width:{$aField['max_width']};'>"
426
+        return "<div id='tabbox-{$aField[ 'field_id' ]}' class='tab-box-container categorydiv' style='max-width:{$aField[ 'max_width' ]};'>"
427 427
                 . "<ul class='tab-box-tabs category-tabs'>" 
428 428
                     . implode( PHP_EOL, $_aTabs ) 
429 429
                 . "</ul>" 
430 430
                 . "<div class='tab-box-contents-container'>"
431
-                    . "<div class='tab-box-contents' style='height: {$aField['height']};'>"
431
+                    . "<div class='tab-box-contents' style='height: {$aField[ 'height' ]};'>"
432 432
                         . implode( PHP_EOL, $_aCheckboxes )
433 433
                     . "</div>"
434 434
                 . "</div>" 
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
         private function _getDataAttributesOfAssociatedPostTypes( $sTaxonomySlusg, $aPostTypes ) {
455 455
             return array(
456 456
                 'data-associated-with'       => $sTaxonomySlusg,
457
-                'data-associated-post-types' => implode( ',', $aPostTypes ) . ',',  // must add a trailing comma for jQuery to detect the item.
457
+                'data-associated-post-types' => implode( ',', $aPostTypes ).',', // must add a trailing comma for jQuery to detect the item.
458 458
             );
459 459
         }
460 460
     
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
         private function _getTaxonomyCheckboxes( array $aField, $sKey, $sTaxonomySlug, $aAttributes ) {
470 470
             
471 471
             $_aTabBoxContainerArguments = array(
472
-                'id'    => "tab_{$aField['input_id']}_{$sKey}",
472
+                'id'    => "tab_{$aField[ 'input_id' ]}_{$sKey}",
473 473
                 'class' => 'tab-box-content',
474 474
                 'style' => $this->generateInlineCSS(
475 475
                     array(
@@ -478,9 +478,9 @@  discard block
 block discarded – undo
478 478
                     )
479 479
                 ),
480 480
             ) + $aAttributes;
481
-            return "<div " . $this->getAttributes( $_aTabBoxContainerArguments ) . ">"
481
+            return "<div ".$this->getAttributes( $_aTabBoxContainerArguments ).">"
482 482
                     . $this->getElement( $aField, array( 'before_label', $sKey ) )
483
-                    . "<div " . $this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ) . ">"
483
+                    . "<div ".$this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ).">"
484 484
                     . "</div>"
485 485
                     . "<ul class='list:category taxonomychecklist form-no-clear'>"
486 486
                         . $this->_getTaxonomyChecklist( $aField, $sKey, $sTaxonomySlug )
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
                         'taxonomy'              => $sTaxonomySlug, 
506 506
                         '_name_prefix'          => is_array( $aField[ 'taxonomy_slugs' ] ) 
507 507
                             ? "{$aField[ '_input_name' ]}[{$sTaxonomySlug}]" 
508
-                            : $aField[ '_input_name' ],   // name prefix of the input
508
+                            : $aField[ '_input_name' ], // name prefix of the input
509 509
                         '_input_id_prefix'      => $aField[ 'input_id' ],
510 510
                         '_attributes'           => $this->getElementAsArray( 
511 511
                             $aField, 
@@ -513,12 +513,12 @@  discard block
 block discarded – undo
513 513
                         ) + $aField[ 'attributes' ],                 
514 514
                         
515 515
                         // checked items ( term IDs ) e.g.  array( 6, 10, 7, 15 ), 
516
-                        '_selected_items'       => $this->_getSelectedKeyArray( $aField['value'], $sTaxonomySlug ),
516
+                        '_selected_items'       => $this->_getSelectedKeyArray( $aField[ 'value' ], $sTaxonomySlug ),
517 517
                         
518
-                        'echo'                  => false,  // returns the output
519
-                        'show_post_count'       => $aField[ 'show_post_count' ],      // 3.2.0+
520
-                        'show_option_none'      => $aField[ 'label_no_term_found' ],  // 3.3.2+ 
521
-                        'title_li'              => $aField[ 'label_list_title' ],     // 3.3.2+
518
+                        'echo'                  => false, // returns the output
519
+                        'show_post_count'       => $aField[ 'show_post_count' ], // 3.2.0+
520
+                        'show_option_none'      => $aField[ 'label_no_term_found' ], // 3.3.2+ 
521
+                        'title_li'              => $aField[ 'label_list_title' ], // 3.3.2+
522 522
                         
523 523
                         '_save_unchecked'       => $aField[ 'save_unchecked' ], // 3.8.8+ Whether to insert hidden input element for unchecked.
524 524
                     ) 
@@ -565,8 +565,8 @@  discard block
 block discarded – undo
565 565
             $_aLiAttribues = array(
566 566
                 'class' => 'tab-box-tab',
567 567
             ) + $aAttributes;
568
-            return "<li " . $this->getAttributes( $_aLiAttribues ) . ">"
569
-                    . "<a href='#tab_{$aField['input_id']}_{$sKey}'>"
568
+            return "<li ".$this->getAttributes( $_aLiAttribues ).">"
569
+                    . "<a href='#tab_{$aField[ 'input_id' ]}_{$sKey}'>"
570 570
                         . "<span class='tab-box-tab-text'>" 
571 571
                             . $this->_getLabelFromTaxonomySlug( $sTaxonomySlug )
572 572
                         . "</span>"
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -441,7 +441,7 @@
 block discarded – undo
441 441
          * @since       3.8.8
442 442
          * @return      array       Post type slugs associated with the given taxonomy.
443 443
          */
444
-        private function _getPostTypesByTaxonomySlug( $sTaxonomySlug ) {            
444
+        private function _getPostTypesByTaxonomySlug( $sTaxonomySlug ) {
445 445
             $_oTaxonomy = get_taxonomy( $sTaxonomySlug );
446 446
             return $_oTaxonomy->object_type;            
447 447
         }
Please login to merge, or discard this patch.
factory/_common/form/input/AdminPageFramework_Input_checkbox.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
     public function get( /* $sLabel, $aAttributes=array() */ ) {
35 35
         
36 36
         // Parameters
37
-        $_aParams       = func_get_args() + array( 
38
-            0 => '',            // 1st parameter
37
+        $_aParams = func_get_args() + array( 
38
+            0 => '', // 1st parameter
39 39
             1 => array()        // 2nd parameter
40 40
         );
41
-        $_sLabel        = $_aParams[ 0 ];       // first parameter
41
+        $_sLabel        = $_aParams[ 0 ]; // first parameter
42 42
 
43 43
         // Attributes
44 44
         $_aAttributes   = $this->uniteArrays(   // second parameter
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
 
49 49
         // Output
50 50
         return 
51
-           "<{$this->aOptions[ 'input_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ) . ">"
51
+           "<{$this->aOptions[ 'input_container_tag' ]} ".$this->getAttributes( $this->aOptions[ 'input_container_attributes' ] ).">"
52 52
                 . $this->_getInputElements( $_aAttributes, $this->aOptions )
53 53
             . "</{$this->aOptions[ 'input_container_tag' ]}>"
54
-            . "<{$this->aOptions[ 'label_container_tag' ]} " . $this->getAttributes( $this->aOptions[ 'label_container_attributes' ] ) . ">"
54
+            . "<{$this->aOptions[ 'label_container_tag' ]} ".$this->getAttributes( $this->aOptions[ 'label_container_attributes' ] ).">"
55 55
                 . $_sLabel
56 56
             . "</{$this->aOptions[ 'label_container_tag' ]}>"
57 57
         ;
@@ -65,16 +65,16 @@  discard block
 block discarded – undo
65 65
         private function _getInputElements( $aAttributes, $aOptions ) {
66 66
             $_sOutput = $this->aOptions[ 'save_unchecked' ]
67 67
                 // the unchecked value must be set prior to the checkbox input field.
68
-                ? "<input " . $this->getAttributes( 
68
+                ? "<input ".$this->getAttributes( 
69 69
                     array(
70 70
                         'type'      => 'hidden',
71 71
                         'class'     => $aAttributes[ 'class' ],
72 72
                         'name'      => $aAttributes[ 'name' ],
73 73
                         'value'     => '0',
74 74
                     ) 
75
-                ) . " />"
75
+                )." />"
76 76
                 : '';
77
-            $_sOutput .= "<input " . $this->getAttributes( $aAttributes ) . " />";
77
+            $_sOutput .= "<input ".$this->getAttributes( $aAttributes )." />";
78 78
             return $_sOutput;
79 79
         }
80 80
         
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     public function getAttributesByKey( /* $sKey */ ) {
88 88
         
89 89
         // Parameters
90
-        $_aParams       = func_get_args() + array( 0 => '', );
90
+        $_aParams       = func_get_args() + array( 0 => '',);
91 91
         $_sKey          = $_aParams[ 0 ];        
92 92
         $_bIsMultiple   = '' !== $_sKey;
93 93
         
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
             // The type needs to be specified since the postytpe field type extends this class. If not set, the 'posttype' will be passed to the type attribute.
100 100
             + array(
101 101
                 'type'      => 'checkbox', 
102
-                'id'        => $this->aAttributes[ 'id' ] . '_' . $_sKey,
102
+                'id'        => $this->aAttributes[ 'id' ].'_'.$_sKey,
103 103
                 'checked'   => $this->_getCheckedAttributeValue( $_sKey ),
104
-                'value'     => 1,   // this must be always 1 because the key value can be zero. In that case, the value always will be false and unchecked.
104
+                'value'     => 1, // this must be always 1 because the key value can be zero. In that case, the value always will be false and unchecked.
105 105
                 'name'      => $_bIsMultiple 
106 106
                     ? "{$this->aAttributes[ 'name' ]}[{$_sKey}]" 
107 107
                     : $this->aAttributes[ 'name' ],
108
-                'data-id'   => $this->aAttributes[ 'id' ],       // referenced by the JavaScript scripts such as the revealer script.
108
+                'data-id'   => $this->aAttributes[ 'id' ], // referenced by the JavaScript scripts such as the revealer script.
109 109
             )
110 110
             + $this->aAttributes
111 111
             ;
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 : array( 'value', $_sKey );
123 123
             return $this->getElement( $this->aAttributes, $_aValueDimension )
124 124
                 ? 'checked' 
125
-                : null;    // to not to set, pass null. An empty value '' will still set the attribute.            
125
+                : null; // to not to set, pass null. An empty value '' will still set the attribute.            
126 126
         
127 127
         }
128 128
         
Please login to merge, or discard this patch.
admin-page-framework-loader.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
  */
17 17
 class AdminPageFrameworkLoader_Registry_Base {
18 18
 
19
-    const VERSION        = '3.8.8b01';    // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
19
+    const VERSION        = '3.8.8b01'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
20 20
     const NAME           = 'Admin Page Framework - Loader'; // the name is not 'Admin Page Framework' because warning messages gets confusing.
21
-    const SHORTNAME      = 'Admin Page Framework';  // used for a menu title etc.
21
+    const SHORTNAME      = 'Admin Page Framework'; // used for a menu title etc.
22 22
     const DESCRIPTION    = 'Loads Admin Page Framework which facilitates WordPress plugin and theme development.';
23 23
     const URI            = 'http://admin-page-framework.michaeluno.jp/';
24 24
     const AUTHOR         = 'miunosoft (Michael Uno)';
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
      * @remark      This is also accessed from `uninstall.php` so do not remove.
56 56
      * @remark      Do not exceed 8 characters as a transient name allows 45 characters or less ( 40 for site transients ) so that md5 (32 characters) can be added.
57 57
      */
58
-    const TRANSIENT_PREFIX         = 'APFL_';
58
+    const TRANSIENT_PREFIX = 'APFL_';
59 59
 
60 60
     /**
61 61
      * The hook slug used for the prefix of action and filter hook names.
62 62
      * 
63 63
      * @remark      The ending underscore is not necessary.
64 64
      */
65
-    const HOOK_SLUG                = 'admin_page_framework_loader';
65
+    const HOOK_SLUG = 'admin_page_framework_loader';
66 66
 
67 67
     /**
68 68
      * The text domain slug and its path.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     static public $aAdminPages = array(
118 118
         // key => 'page slug'
119
-        'about'     => 'apfl_about',        // the welcome page
119
+        'about'     => 'apfl_about', // the welcome page
120 120
         'addon'     => 'apfl_addons',
121 121
         'tool'      => 'apfl_tools',
122 122
         'help'      => 'apfl_contact',
@@ -154,12 +154,12 @@  discard block
 block discarded – undo
154 154
      * @since       3.5.0
155 155
      * @return      string
156 156
      */
157
-    public static function getPluginURL( $sRelativePath='' ) {
157
+    public static function getPluginURL( $sRelativePath = '' ) {
158 158
         if ( isset( self::$_sPluginURLCache ) ) {
159
-            return self::$_sPluginURLCache . $sRelativePath;
159
+            return self::$_sPluginURLCache.$sRelativePath;
160 160
         }
161 161
         self::$_sPluginURLCache = trailingslashit( plugins_url( '', self::$sFilePath ) );
162
-        return self::$_sPluginURLCache . $sRelativePath;
162
+        return self::$_sPluginURLCache.$sRelativePath;
163 163
     }
164 164
         /**
165 165
          * @since       3.7.9
@@ -189,13 +189,13 @@  discard block
 block discarded – undo
189 189
      * @since       3.5.0
190 190
      * @return      void
191 191
      */ 
192
-    static public function setAdminNotice( $sMessage, $sClassAttribute='error' ) {
193
-        if ( ! is_admin() ) {  
192
+    static public function setAdminNotice( $sMessage, $sClassAttribute = 'error' ) {
193
+        if ( !is_admin() ) {  
194 194
             return; 
195 195
         }
196
-        self::$_aAdminNotices[] = array(
196
+        self::$_aAdminNotices[ ] = array(
197 197
             'message'           => $sMessage,
198
-            'class_attribute'   => trim( $sClassAttribute ) . ' notice is-dismissible',
198
+            'class_attribute'   => trim( $sClassAttribute ).' notice is-dismissible',
199 199
         );
200 200
         add_action( 'admin_notices', array( __CLASS__, '_replyToSetAdminNotice' ) );
201 201
     }
@@ -205,12 +205,12 @@  discard block
 block discarded – undo
205 205
          * @return      void
206 206
          */
207 207
         static public function _replyToSetAdminNotice() {
208
-            foreach( self::$_aAdminNotices as $_aAdminNotice ) {
209
-                echo "<div class='" . esc_attr( $_aAdminNotice['class_attribute'] ) . " notice is-dismissible'>"
208
+            foreach ( self::$_aAdminNotices as $_aAdminNotice ) {
209
+                echo "<div class='".esc_attr( $_aAdminNotice[ 'class_attribute' ] )." notice is-dismissible'>"
210 210
                         ."<p>"
211 211
                             . sprintf(
212
-                                '<strong>%1$s</strong>: ' . $_aAdminNotice['message'],
213
-                                self::NAME . ' ' . self::VERSION
212
+                                '<strong>%1$s</strong>: '.$_aAdminNotice[ 'message' ],
213
+                                self::NAME.' '.self::VERSION
214 214
                             )
215 215
                         . "</p>"
216 216
                     . "</div>";
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 AdminPageFrameworkLoader_Registry::setUp( __FILE__ );
223 223
 
224 224
 // Initial checks. - Do no load if accessed directly, not exiting because the 'uninstall.php' and inclusion list generator will load this file.
225
-if ( ! defined( 'ABSPATH' ) ) {
225
+if ( !defined( 'ABSPATH' ) ) {
226 226
     return;
227 227
 }
228 228
 if ( defined( 'DOING_UNINSTALL' ) ) {
@@ -234,8 +234,8 @@  discard block
 block discarded – undo
234 234
 
235 235
     $_bFrameworkLoaded = class_exists( 'AdminPageFramework_Registry', false );
236 236
     if (
237
-        ! $_bFrameworkLoaded
238
-        || ! defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility
237
+        !$_bFrameworkLoaded
238
+        || !defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility
239 239
         || version_compare( AdminPageFramework_Registry::VERSION, AdminPageFrameworkLoader_Registry::VERSION, '<' )
240 240
     ) {
241 241
         AdminPageFrameworkLoader_Registry::setAdminNotice(
@@ -253,18 +253,18 @@  discard block
 block discarded – undo
253 253
 add_action( 'admin_init', 'AdminPageFrameworkLoader_Warning' );
254 254
 
255 255
 // Include the library file - the development version will be available if you cloned the GitHub repository.
256
-$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/development/admin-page-framework.php';
256
+$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/development/admin-page-framework.php';
257 257
 $_bDebugMode              = defined( 'WP_DEBUG' ) && WP_DEBUG;
258 258
 $_bLoadDevelopmentVersion = $_bDebugMode && file_exists( $_sDevelopmentVersionPath );
259 259
 include(
260 260
     $_bLoadDevelopmentVersion
261 261
         ? $_sDevelopmentVersionPath
262
-        : AdminPageFrameworkLoader_Registry::$sDirPath . '/library/apf/admin-page-framework.php'
262
+        : AdminPageFrameworkLoader_Registry::$sDirPath.'/library/apf/admin-page-framework.php'
263 263
 );
264 264
 
265 265
 // Include the framework loader plugin components.
266 266
 include( AdminPageFramework_Registry::$aClassFiles[ 'AdminPageFramework_PluginBootstrap' ] );
267
-include( AdminPageFrameworkLoader_Registry::$sDirPath . '/include/class/AdminPageFrameworkLoader_Bootstrap.php' );
267
+include( AdminPageFrameworkLoader_Registry::$sDirPath.'/include/class/AdminPageFrameworkLoader_Bootstrap.php' );
268 268
 new AdminPageFrameworkLoader_Bootstrap(
269 269
     AdminPageFrameworkLoader_Registry::$sFilePath,
270 270
     AdminPageFrameworkLoader_Registry::HOOK_SLUG    // hook prefix
Please login to merge, or discard this patch.