Completed
Branch master (b5e54a)
by
unknown
25:50
created
form/_view/resource/AdminPageFramework_Form_View__Resource__Head.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param       object      $oForm
30 30
      * @param       string      $sHeadActionHook        The action hook triggered inside the `<head>` tag. For front-end forms, use `wp_head`.
31 31
      */
32
-    public function __construct( $oForm, $sHeadActionHook='admin_head' ) {
32
+    public function __construct( $oForm, $sHeadActionHook = 'admin_head' ) {
33 33
     
34 34
         $this->oForm = $oForm;
35 35
     
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
          * as multiple instances of the factory class is loaded among separate pages, 
54 54
          * one gets denied here and if it can load earlier than the one which should insert the below script.
55 55
          */
56
-        if ( ! $this->oForm->isInThePage() ) {
56
+        if ( !$this->oForm->isInThePage() ) {
57 57
             return;
58 58
         }    
59 59
     
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
         private function _getScripts_RequiredInHead() {
77 77
             return 'document.write( "<style class=\'admin-page-framework-js-embedded-inline-style\'>'
78 78
                     . str_replace(
79
-                        '\\n',   // search
80
-                        '',     // replace
79
+                        '\\n', // search
80
+                        '', // replace
81 81
                         esc_js( $this->_getInlineCSS() )    // subject
82 82
                     )
83 83
                 . '</style>" );';            
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     
34 34
         $this->oForm = $oForm;
35 35
     
36
-        if ( in_array( $this->oForm->aArguments[ 'structure_type' ], array( 'widget' ) ) ) {       
36
+        if ( in_array( $this->oForm->aArguments[ 'structure_type' ], array( 'widget' ) ) ) {
37 37
             return;
38 38
         }
39 39
     
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                  * @return      string
98 98
                  * @since       DEVVER
99 99
                  */
100
-                private function _getScriptElementConcealerCSSRules() {                    
100
+                private function _getScriptElementConcealerCSSRules() {
101 101
                     
102 102
                     // Avoid hiding framework forms in widgets. In some cases, the user sets a form in any page,
103 103
                     // which causes a different structure form type including `admin_page` gets loaded even in widgets.php (or any page builder pages dealing with widgets)
Please login to merge, or discard this patch.
_abstract/form/_view/resource/AdminPageFramework_Form_View__Resource.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
      * @since       DEVVER
104 104
      */
105 105
     public function _replyToEnqueueScripts() {
106
-        if ( ! $this->oForm->isInThePage() ) {
106
+        if ( !$this->oForm->isInThePage() ) {
107 107
             return;
108 108
         }
109
-        foreach( $this->oForm->getResources( 'src_scripts' ) as $_asEnqueue ) {
109
+        foreach ( $this->oForm->getResources( 'src_scripts' ) as $_asEnqueue ) {
110 110
             $this->_enqueueScript( $_asEnqueue );
111 111
         }       
112 112
     }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             private function _getFormattedEnqueueScript( $asEnqueue ) {
155 155
                 static $_iCallCount = 1;
156 156
                 $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array(
157
-                    'handle_id'     => 'script_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount,
157
+                    'handle_id'     => 'script_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount,
158 158
                     'src'           => null,
159 159
                     'dependencies'  => null,
160 160
                     'version'       => null,
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
      */    
178 178
     public function _replyToEnqueueStyles() {
179 179
 
180
-        if ( ! $this->oForm->isInThePage() ) {
180
+        if ( !$this->oForm->isInThePage() ) {
181 181
             return;
182 182
         }
183
-        foreach( $this->oForm->getResources( 'src_styles' ) as $_asEnqueueItem ) {
183
+        foreach ( $this->oForm->getResources( 'src_styles' ) as $_asEnqueueItem ) {
184 184
             $this->_enqueueStyle( $_asEnqueueItem );
185 185
         }           
186 186
     
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             private function _getFormattedEnqueueStyle( $asEnqueue ) {
202 202
                 static $_iCallCount = 1;
203 203
                 $_aEnqueueItem = $this->getAsArray( $asEnqueue ) + array(
204
-                    'handle_id'     => 'style_' . $this->oForm->aArguments[ 'caller_id' ] . '_' . $_iCallCount,
204
+                    'handle_id'     => 'style_'.$this->oForm->aArguments[ 'caller_id' ].'_'.$_iCallCount,
205 205
                     'src'           => null,
206 206
                     'dependencies'  => null,
207 207
                     'version'       => null,
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
      */    
223 223
     public function _replyToAddStyle() {
224 224
         
225
-        if ( ! $this->oForm->isInThePage() ) {
225
+        if ( !$this->oForm->isInThePage() ) {
226 226
             return;
227 227
         }   
228 228
         $_sCSSRules = $this->_getFormattedInlineStyles( 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      */    
268 268
     public function _replyToAddScript() {
269 269
         
270
-        if ( ! $this->oForm->isInThePage() ) {
270
+        if ( !$this->oForm->isInThePage() ) {
271 271
             return;
272 272
         }        
273 273
         
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@
 block discarded – undo
230 230
         );
231 231
         
232 232
         $_sID = $this->sanitizeSlug( strtolower( $this->oForm->aArguments[ 'caller_id' ] ) );
233
-        if ( $_sCSSRules ) {            
233
+        if ( $_sCSSRules ) {
234 234
             echo "<style type='text/css' id='inline-style-{$_sID}' class='admin-page-framework-form-style'>"
235 235
                     . $_sCSSRules
236 236
                 . "</style>";
Please login to merge, or discard this patch.
development/factory/_abstract/_model/AdminPageFramework_Message.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
         'confirm_perform_task'                  => 'Please confirm your action.', 
83 83
         'specified_option_been_deleted'         => 'The specified options have been deleted.', 
84 84
         'nonce_verification_failed'             => 'A problem occurred while processing the form data. Please try again.', 
85
-        'check_max_input_vars'                  => 'Not all form fields could not be sent. Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. <code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s',  // 3.5.11+
86
-        'send_email'                            => 'Is it okay to send the email?',     // 3.3.0+
87
-        'email_sent'                            => 'The email has been sent.',  // 3.3.0+, 3.3.5+ deprecated 
85
+        'check_max_input_vars'                  => 'Not all form fields could not be sent. Please check your server settings of PHP <code>max_input_vars</code> and consult the server administrator to increase the value. <code>max input vars</code>: %1$s. <code>$_POST</code> count: %2$s', // 3.5.11+
86
+        'send_email'                            => 'Is it okay to send the email?', // 3.3.0+
87
+        'email_sent'                            => 'The email has been sent.', // 3.3.0+, 3.3.5+ deprecated 
88 88
         'email_scheduled'                       => 'The email has been scheduled.', // 3.3.5+
89
-        'email_could_not_send'                  => 'There was a problem sending the email',     // 3.3.0+
89
+        'email_could_not_send'                  => 'There was a problem sending the email', // 3.3.0+
90 90
         
91 91
         // AdminPageFramework_PostType
92 92
         'title'                                 => 'Title',     
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
         'upload_file'                           => 'Upload File', 
113 113
         'use_this_file'                         => 'Use This File', 
114 114
         'select_file'                           => 'Select File', 
115
-        'remove_value'                          => 'Remove Value',  // 3.2.0+
116
-        'select_all'                            => 'Select All',    // 3.3.0+
117
-        'select_none'                           => 'Select None',   // 3.3.0+                       
115
+        'remove_value'                          => 'Remove Value', // 3.2.0+
116
+        'select_all'                            => 'Select All', // 3.3.0+
117
+        'select_none'                           => 'Select None', // 3.3.0+                       
118 118
         'no_term_found'                         => 'No term found.', // 3.3.2+
119 119
 
120 120
         // AdminPageFramework_Form_View___Script_{...}
121 121
         'select'                                => 'Select', // 3.4.2+             
122
-        'insert'                                => 'Insert',  // 3.4.2+
122
+        'insert'                                => 'Insert', // 3.4.2+
123 123
         'use_this'                              => 'Use This', // 3.4.2+
124 124
         'return_to_library'                     => 'Return to Library', // 3.4.2+
125 125
             
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      * @since       3.2.0       Changed it to create an instance per text domain basis.
197 197
      * @remark      This class should be instantiated via this method.
198 198
      */
199
-    public static function getInstance( $sTextDomain='admin-page-framework' ) {
199
+    public static function getInstance( $sTextDomain = 'admin-page-framework' ) {
200 200
         
201 201
         $_oInstance = isset( self::$_aInstancesByTextDomain[ $sTextDomain ] ) && ( self::$_aInstancesByTextDomain[ $sTextDomain ] instanceof AdminPageFramework_Message )
202 202
             ? self::$_aInstancesByTextDomain[ $sTextDomain ]
@@ -209,21 +209,21 @@  discard block
 block discarded – undo
209 209
          * Ensures that only one instance of this class object exists. ( no multiple instances of this object ) 
210 210
          * @deprecated  3.2.0
211 211
          */
212
-        public static function instantiate( $sTextDomain='admin-page-framework' ) {
212
+        public static function instantiate( $sTextDomain = 'admin-page-framework' ) {
213 213
             return self::getInstance( $sTextDomain );
214 214
         }
215 215
         
216 216
     /**
217 217
      * Sets up properties.
218 218
      */
219
-    public function __construct( $sTextDomain='admin-page-framework' ) {
219
+    public function __construct( $sTextDomain = 'admin-page-framework' ) {
220 220
         
221 221
         $this->_sTextDomain = $sTextDomain;  
222 222
         
223 223
         // Fill the $aMessages property with the keys extracted from the $aDefaults property
224 224
         // with the value of null.  The null is set to let it trigger the __get() method 
225 225
         // so that each translation item gets processed individually.
226
-        $this->aMessages    = array_fill_keys( 
226
+        $this->aMessages = array_fill_keys( 
227 227
             array_keys( $this->aDefaults ),
228 228
             null        
229 229
         );
@@ -257,13 +257,13 @@  discard block
 block discarded – undo
257 257
      * @since       DEVVER      If no key is specified, return the entire mesage array.
258 258
      * @return      string|array
259 259
      */
260
-    public function get( $sKey='' ) {
261
-        if ( ! $sKey ) {
260
+    public function get( $sKey = '' ) {
261
+        if ( !$sKey ) {
262 262
             return $this->_getAllMessages();
263 263
         }
264 264
         return isset( $this->aMessages[ $sKey ] )
265 265
             ? __( $this->aMessages[ $sKey ], $this->_sTextDomain )
266
-            : __( $this->{$sKey}, $this->_sTextDomain );     // triggers __get()
266
+            : __( $this->{$sKey}, $this->_sTextDomain ); // triggers __get()
267 267
     }
268 268
         /**
269 269
          * Returns the all registered messag items.
Please login to merge, or discard this patch.
form/_view/script/AdminPageFramework_Form_View___Script_Widget.php 1 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 for creating fields in the taxonomy page (edit-tags.php).
Please login to merge, or discard this patch.
admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Guide.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Admin Page Framework Loader
4
- * 
5
- * Demonstrates the usage of Admin Page Framework.
6
- * 
7
- * http://en.michaeluno.jp/admin-page-framework/
8
- * Copyright (c) 2013-2015 Michael Uno; Licensed GPLv2
9
- * 
10
- */
3
+     * Admin Page Framework Loader
4
+     * 
5
+     * Demonstrates the usage of Admin Page Framework.
6
+     * 
7
+     * http://en.michaeluno.jp/admin-page-framework/
8
+     * Copyright (c) 2013-2015 Michael Uno; Licensed GPLv2
9
+     * 
10
+     */
11 11
 
12 12
 /**
13 13
  * Adds a tab of the set page to the loader plugin.
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
@@ -433,8 +433,8 @@  discard block
 block discarded – undo
433 433
     protected function getField( $aField ) {
434 434
 
435 435
         $_aOutput = array();
436
-        foreach( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) {
437
-            $_aOutput[] = $this->_getFieldOutputByLabel( 
436
+        foreach ( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) {
437
+            $_aOutput[ ] = $this->_getFieldOutputByLabel( 
438 438
                 $_sKey, 
439 439
                 $_sLabel, 
440 440
                 $aField
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
         }
443 443
         
444 444
         // the repeatable field buttons will be replaced with this element.
445
-        $_aOutput[] = "<div class='repeatable-field-buttons'></div>";
445
+        $_aOutput[ ] = "<div class='repeatable-field-buttons'></div>";
446 446
         return implode( '', $_aOutput );
447 447
         
448 448
     }
@@ -461,27 +461,27 @@  discard block
 block discarded – undo
461 461
             $aField[ 'rich' ]       = $this->getElementByLabel( $aField[ 'rich' ], $sKey, $aField[ 'label' ] );
462 462
             $aField[ 'attributes' ] = $_bIsArray
463 463
                 ? array(
464
-                        'name'  => $aField[ 'attributes' ][ 'name' ] . "[{$sKey}]",
465
-                        'id'    => $aField[ 'attributes' ][ 'id' ] . "_{$sKey}",
464
+                        'name'  => $aField[ 'attributes' ][ 'name' ]."[{$sKey}]",
465
+                        'id'    => $aField[ 'attributes' ][ 'id' ]."_{$sKey}",
466 466
                         'value' => $aField[ 'value' ],
467 467
                     ) 
468 468
                     + $aField[ 'attributes' ]
469 469
                 : $aField[ 'attributes' ];
470
-            $_aOutput           = array(
471
-                $this->getElementByLabel( $aField['before_label'], $sKey, $aField[ 'label' ] ),
470
+            $_aOutput = array(
471
+                $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $aField[ 'label' ] ),
472 472
                 "<div class='admin-page-framework-input-label-container {$_sClassSelector}'>",
473
-                    "<label for='" . $aField[ 'attributes' ][ 'id' ] . "'>",
474
-                        $this->getElementByLabel( $aField['before_input'], $sKey, $aField[ 'label' ] ),
473
+                    "<label for='".$aField[ 'attributes' ][ 'id' ]."'>",
474
+                        $this->getElementByLabel( $aField[ 'before_input' ], $sKey, $aField[ 'label' ] ),
475 475
                         $_sLabel 
476
-                            ? "<span class='admin-page-framework-input-label-string' style='min-width:" . $this->sanitizeLength( $aField['label_min_width'] ) . ";'>" 
476
+                            ? "<span class='admin-page-framework-input-label-string' style='min-width:".$this->sanitizeLength( $aField[ 'label_min_width' ] ).";'>" 
477 477
                                     . $_sLabel
478 478
                                 . "</span>"
479 479
                             : '',
480 480
                         $this->_getEditor( $aField ),
481
-                        $this->getElementByLabel( $aField['after_input'], $sKey, $aField[ 'label' ] ),
481
+                        $this->getElementByLabel( $aField[ 'after_input' ], $sKey, $aField[ 'label' ] ),
482 482
                     "</label>",
483 483
                 "</div>",
484
-                $this->getElementByLabel( $aField['after_label'], $sKey, $aField[ 'label' ] ),
484
+                $this->getElementByLabel( $aField[ 'after_label' ], $sKey, $aField[ 'label' ] ),
485 485
             );
486 486
             return implode( '', $_aOutput );
487 487
   
@@ -494,31 +494,31 @@  discard block
 block discarded – undo
494 494
          */
495 495
         private function _getEditor( $aField ) {
496 496
                         
497
-            unset( $aField['attributes']['value'] );
497
+            unset( $aField[ 'attributes' ][ 'value' ] );
498 498
             
499 499
             // For no TinyMCE
500
-            if ( empty( $aField['rich'] ) || ! $this->isTinyMCESupported() ) {
501
-                return "<textarea " . $this->getAttributes( $aField['attributes'] ) . " >" // this method is defined in the base class
502
-                            . esc_textarea( $aField['value'] )
500
+            if ( empty( $aField[ 'rich' ] ) || !$this->isTinyMCESupported() ) {
501
+                return "<textarea ".$this->getAttributes( $aField[ 'attributes' ] )." >" // this method is defined in the base class
502
+                            . esc_textarea( $aField[ 'value' ] )
503 503
                         . "</textarea>";
504 504
             }
505 505
 
506 506
             // Rich editor
507 507
             ob_start();
508 508
             wp_editor( 
509
-                $aField['value'],
510
-                $aField['attributes']['id'],  
509
+                $aField[ 'value' ],
510
+                $aField[ 'attributes' ][ 'id' ],  
511 511
                 $this->uniteArrays( 
512
-                    ( array ) $aField['rich'],
512
+                    ( array ) $aField[ 'rich' ],
513 513
                     array(
514 514
                         'wpautop'           => true, // use wpautop?
515 515
                         'media_buttons'     => true, // show insert/upload button(s)
516
-                        'textarea_name'     => $aField['attributes']['name'],
517
-                        'textarea_rows'     => $aField['attributes']['rows'],
516
+                        'textarea_name'     => $aField[ 'attributes' ][ 'name' ],
517
+                        'textarea_rows'     => $aField[ 'attributes' ][ 'rows' ],
518 518
                         'tabindex'          => '',
519 519
                         'tabfocus_elements' => ':prev,:next', // the previous and next element ID to move the focus to when pressing the Tab key in TinyMCE
520 520
                         'editor_css'        => '', // intended for extra styles for both visual and Text editors buttons, needs to include the <style> tags, can use "scoped".
521
-                        'editor_class'      => $aField['attributes']['class'], // add extra class(es) to the editor textarea
521
+                        'editor_class'      => $aField[ 'attributes' ][ 'class' ], // add extra class(es) to the editor textarea
522 522
                         'teeny'             => false, // output the minimal editor config used in Press This
523 523
                         'dfw'               => false, // replace the default fullscreen with DFW (needs specific DOM elements and css)
524 524
                         'tinymce'           => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
             ob_end_clean();
531 531
             
532 532
             return $_sContent
533
-                . $this->_getScriptForRichEditor( $aField['attributes']['id'] );
533
+                . $this->_getScriptForRichEditor( $aField[ 'attributes' ][ 'id' ] );
534 534
             
535 535
         }
536 536
     
Please login to merge, or discard this patch.
_abstract/form/_view/css/AdminPageFramework_Form_View___CSS_Section.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@
 block discarded – undo
24 24
     protected function _get() {
25 25
         return $this->_getFormSectionRules();
26 26
     }
27
-         /**
28
-         * Returns the CSS rules for form fields.
29
-         * 
30
-         * @since       3.4.0
31
-         * @since       3.7.0      Moved from `AdminPageFramework_CSS`.
32
-         * @internal
33
-         */    
27
+            /**
28
+             * Returns the CSS rules for form fields.
29
+             * 
30
+             * @since       3.4.0
31
+             * @since       3.7.0      Moved from `AdminPageFramework_CSS`.
32
+             * @internal
33
+             */    
34 34
         private function _getFormSectionRules() {
35 35
             
36 36
             return <<<CSSRULES
Please login to merge, or discard this patch.
form/_model/formatter/AdminPageFramework_Form_Model___FormatSectionset.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -35,41 +35,41 @@  discard block
 block discarded – undo
35 35
         // Optional
36 36
         'page_slug'         => null,
37 37
         'tab_slug'          => null,
38
-        'section_tab_slug'  => null,    // 3.0.0+
38
+        'section_tab_slug'  => null, // 3.0.0+
39 39
         'title'             => null,
40 40
         'description'       => null,
41 41
         'capability'        => null,
42 42
         'if'                => true,    
43
-        'order'             => null,    // do not set the default number here because incremented numbers will be added when registering the sections.
43
+        'order'             => null, // do not set the default number here because incremented numbers will be added when registering the sections.
44 44
         'help'              => null,
45 45
         'help_aside'        => null,
46
-        'repeatable'        => false,   // (boolean|array) 3.0.0+
47
-        'sortable'          => false,   // (boolean|array) 3.6.0+
46
+        'repeatable'        => false, // (boolean|array) 3.0.0+
47
+        'sortable'          => false, // (boolean|array) 3.6.0+
48 48
         'attributes'        => array(   // 3.3.1+
49
-            'class'         => null,    // set null to avoid undefined index warnings.
50
-            'style'         => null,    // set null to avoid undefined index warnings.
49
+            'class'         => null, // set null to avoid undefined index warnings.
50
+            'style'         => null, // set null to avoid undefined index warnings.
51 51
             'tab'           => array(),
52 52
         ),
53 53
         'class'             => array(    // 3.3.1+
54 54
             'tab'           => array(),
55 55
         ),
56
-        'hidden'            => false,    // 3.3.1+
57
-        'collapsible'       => false,    // 3.4.0+ (boolean|array) For the array structure see the $aStructure_CollapsibleArguments property.
58
-        'save'              => true,     // 3.6.0+
56
+        'hidden'            => false, // 3.3.1+
57
+        'collapsible'       => false, // 3.4.0+ (boolean|array) For the array structure see the $aStructure_CollapsibleArguments property.
58
+        'save'              => true, // 3.6.0+
59 59
         
60
-        'content'           => null,     // 3.6.1+  (string) An overriding section-set output.
60
+        'content'           => null, // 3.6.1+  (string) An overriding section-set output.
61 61
         
62
-        'tip'               => null,     // 3.7.0  (string) Tool tip HTML strings. 
62
+        'tip'               => null, // 3.7.0  (string) Tool tip HTML strings. 
63 63
         
64 64
         // Internal
65
-        '_fields_type'      => null,     // @deprecated 3.7.0+ Use the `_structure_type` instead. 3.0.0+ - same as the one of the field definition array. Used to insert debug info at the bottom of sections.        
66
-        '_structure_type'   => null,     // 3.7.0+
67
-        '_is_first_index'   => false,    // 3.4.0+ (boolean) indicates whether it is the first item of the sub-sections (for repeatable sections).
68
-        '_is_last_index'    => false,    // 3.4.0+ (boolean) indicates whether it is the last item of the sub-sections (for repeatable sections).
65
+        '_fields_type'      => null, // @deprecated 3.7.0+ Use the `_structure_type` instead. 3.0.0+ - same as the one of the field definition array. Used to insert debug info at the bottom of sections.        
66
+        '_structure_type'   => null, // 3.7.0+
67
+        '_is_first_index'   => false, // 3.4.0+ (boolean) indicates whether it is the first item of the sub-sections (for repeatable sections).
68
+        '_is_last_index'    => false, // 3.4.0+ (boolean) indicates whether it is the last item of the sub-sections (for repeatable sections).
69 69
         
70
-        '_section_path'         => '',       // 3.7.0+ (string) e.g. my_section|nested_section       
71
-        '_section_path_array'   => '',       // 3.7.0+ (array) an array version of the above section_path argument. Numerically indexed.
72
-        '_nested_depth'         => 0,        // 3.7.0+ (integer) the nested level of the section
70
+        '_section_path'         => '', // 3.7.0+ (string) e.g. my_section|nested_section       
71
+        '_section_path_array'   => '', // 3.7.0+ (array) an array version of the above section_path argument. Numerically indexed.
72
+        '_nested_depth'         => 0, // 3.7.0+ (integer) the nested level of the section
73 73
         
74 74
         // 3.6.0+ - (object) the caller framework factory object. This allows the framework to access the factory property when rendering the section.
75 75
         // 3.7.0+  It no longer stores a factory object but a form object.
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
         $_aSectionPath = explode( '|', $this->sSectionPath );
125 125
         $_aSectionset  = $this->uniteArrays(
126 126
             array( 
127
-                '_fields_type'          => $this->sStructureType,   // @deprecated  3.7.0+
128
-                '_structure_type'       => $this->sStructureType,   // 3.7.0+
129
-                '_section_path'         => $this->sSectionPath,     // 3.7.0+
127
+                '_fields_type'          => $this->sStructureType, // @deprecated  3.7.0+
128
+                '_structure_type'       => $this->sStructureType, // 3.7.0+
129
+                '_section_path'         => $this->sSectionPath, // 3.7.0+
130 130
                 '_section_path_array'   => $_aSectionPath,
131
-                '_nested_depth'         => count( $_aSectionPath ) - 1,    // 3.7.0+ - zero base
131
+                '_nested_depth'         => count( $_aSectionPath ) - 1, // 3.7.0+ - zero base
132 132
             ) 
133 133
             + $this->aSectionset
134 134
             + array(
Please login to merge, or discard this patch.
form/_model/formatter/AdminPageFramework_Form_Model___Format_Fieldset.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -29,36 +29,36 @@  discard block
 block discarded – undo
29 29
     static public $aStructure = array(
30 30
     
31 31
         // Required Keys
32
-        'field_id'                  => null,    // (string)
33
-        'type'                      => null,    // (string)
34
-        'section_id'                => null,    // (string)
32
+        'field_id'                  => null, // (string)
33
+        'type'                      => null, // (string)
34
+        'section_id'                => null, // (string)
35 35
 
36 36
         // Optional Keys        
37
-        'section_title'             => null,    // This will be assigned automatically in the formatting method.
38
-        'page_slug'                 => null,    // This will be assigned automatically in the formatting method.
39
-        'tab_slug'                  => null,    // This will be assigned automatically in the formatting method.
40
-        'option_key'                => null,    // This will be assigned automatically in the formatting method.
41
-        'class_name'                => null,    // Stores the instantiated class name. Used by the export field type. Also a third party custom field type uses it.
37
+        'section_title'             => null, // This will be assigned automatically in the formatting method.
38
+        'page_slug'                 => null, // This will be assigned automatically in the formatting method.
39
+        'tab_slug'                  => null, // This will be assigned automatically in the formatting method.
40
+        'option_key'                => null, // This will be assigned automatically in the formatting method.
41
+        'class_name'                => null, // Stores the instantiated class name. Used by the export field type. Also a third party custom field type uses it.
42 42
         'capability'                => null,        
43 43
         'title'                     => null,    
44 44
         'tip'                       => null,    
45 45
         'description'               => null,    
46
-        'error_message'             => null,    // error message for the field
46
+        'error_message'             => null, // error message for the field
47 47
         'before_label'              => null,    
48 48
         'after_label'               => null,    
49 49
         'if'                        => true,    
50
-        'order'                     => null,    // do not set the default number here for this key.     
50
+        'order'                     => null, // do not set the default number here for this key.     
51 51
         'default'                   => null,
52 52
         'value'                     => null,
53
-        'help'                      => null,    // 2.1.0+
54
-        'help_aside'                => null,    // 2.1.0+
55
-        'repeatable'                => null,    // 2.1.3+
56
-        'sortable'                  => null,    // 2.1.3+
57
-        'show_title_column'         => true,    // 3.0.0+
58
-        'hidden'                    => null,    // 3.0.0+
53
+        'help'                      => null, // 2.1.0+
54
+        'help_aside'                => null, // 2.1.0+
55
+        'repeatable'                => null, // 2.1.3+
56
+        'sortable'                  => null, // 2.1.3+
57
+        'show_title_column'         => true, // 3.0.0+
58
+        'hidden'                    => null, // 3.0.0+
59 59
 
60 60
         // @todo    Examine why an array is not set but null here for the attributes argument.
61
-        'attributes'                => null,    // 3.0.0+ - the array represents the attributes of input tag
61
+        'attributes'                => null, // 3.0.0+ - the array represents the attributes of input tag
62 62
         'class'                     => array(   // 3.3.1+
63 63
             'fieldrow'  =>  array(),
64 64
             'fieldset'  =>  array(),
@@ -66,21 +66,21 @@  discard block
 block discarded – undo
66 66
             'field'     =>  array(),
67 67
         ), 
68 68
 
69
-        'save'                      => true,    // 3.6.0+
70
-        'content'                   => null,    // 3.6.1+ - (string) An overriding field-set output.
69
+        'save'                      => true, // 3.6.0+
70
+        'content'                   => null, // 3.6.1+ - (string) An overriding field-set output.
71 71
         
72 72
         // Internal Keys
73
-        '_fields_type'              => null,    // @deprecated  3.7.0++, 3.0.0+ - an internal key that indicates the fields type such as page, meta box for pages, meta box for posts, or taxonomy.
74
-        '_structure_type'           => null,    // DEVVEr+
75
-        '_caller_object'            => null,    // 3.4.0+ - (object) stores the object of the caller class. The object is referenced when creating nested fields.
73
+        '_fields_type'              => null, // @deprecated  3.7.0++, 3.0.0+ - an internal key that indicates the fields type such as page, meta box for pages, meta box for posts, or taxonomy.
74
+        '_structure_type'           => null, // DEVVEr+
75
+        '_caller_object'            => null, // 3.4.0+ - (object) stores the object of the caller class. The object is referenced when creating nested fields.
76 76
                 
77
-        '_section_path'             => '',      // 3.7.0+ (string) Stores the section path that indicates the structural address of the nested section. e.g. my_section|nested_one
78
-        '_section_path_array'       => '',      // 3.7.0+ (array) An array version of the above section path.
79
-        '_nested_depth'             => 0,       // 3.4.0+ - (integer) stores the level of the nesting depth. This is mostly used for debugging by checking if the field is a nested field or not.        
80
-        '_subsection_index'         => null,    // 3.7.0+  Passed to the `field_definition_{...}` filter hook callbacks.
77
+        '_section_path'             => '', // 3.7.0+ (string) Stores the section path that indicates the structural address of the nested section. e.g. my_section|nested_one
78
+        '_section_path_array'       => '', // 3.7.0+ (array) An array version of the above section path.
79
+        '_nested_depth'             => 0, // 3.4.0+ - (integer) stores the level of the nesting depth. This is mostly used for debugging by checking if the field is a nested field or not.        
80
+        '_subsection_index'         => null, // 3.7.0+  Passed to the `field_definition_{...}` filter hook callbacks.
81 81
         
82
-        '_field_path'               => '',      // 3.7.0+ (string Stores the field path that indicates the structural location of the field. This is relative to the belonging section.
83
-        '_field_path_array'         => '',      // 3.7.0+ (array) An array version of the above field path.
82
+        '_field_path'               => '', // 3.7.0+ (string Stores the field path that indicates the structural location of the field. This is relative to the belonging section.
83
+        '_field_path_array'         => '', // 3.7.0+ (array) An array version of the above field path.
84 84
         
85 85
     );        
86 86
     
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
             array( 
158 158
                 '_fields_type'          => $this->sStructureType, // @deprecated 3.7.0 backward-compatibility
159 159
                 '_structure_type'       => $this->sStructureType,  
160
-                '_caller_object'        => $this->oCallerObject,  // 3.4.1+ Stores the caller framework factory object. 
161
-                '_subsection_index'     => $this->iSubSectionIndex,  // 3.7.0+
160
+                '_caller_object'        => $this->oCallerObject, // 3.4.1+ Stores the caller framework factory object. 
161
+                '_subsection_index'     => $this->iSubSectionIndex, // 3.7.0+
162 162
             )
163 163
             + $this->aFieldset,
164 164
             array( 
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
 // @todo when nested fields are supported, set an appropriate value here.
178 178
 $_aFieldset[ '_field_path' ]        = $this->getFormElementPath( $_aFieldset[ 'field_id' ] );
179 179
 $_aFieldset[ '_field_path_array' ]  = explode( '|', $_aFieldset[ '_field_path' ] );
180
-$_aFieldset[ '_nested_depth' ]      = count( $_aFieldset[ '_field_path_array' ] ) - 1 ;
180
+$_aFieldset[ '_nested_depth' ]      = count( $_aFieldset[ '_field_path_array' ] ) - 1;
181 181
         
182
-        $_aFieldset[ 'order' ]       = $this->getAOrB(
182
+        $_aFieldset[ 'order' ] = $this->getAOrB(
183 183
             is_numeric( $_aFieldset[ 'order' ] ),
184 184
             $_aFieldset[ 'order' ],
185 185
             $this->iCountOfElements + 10
Please login to merge, or discard this patch.