Completed
Branch master (b9c20c)
by
unknown
03:58
created
_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
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.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      * Defines the field type slugs used for this field type.
119 119
      * @var     array
120 120
      */
121
-    public $aFieldTypeSlugs = array( 'taxonomy', );
121
+    public $aFieldTypeSlugs = array( 'taxonomy',);
122 122
     
123 123
     /**
124 124
      * Defines the default key-values of this field type. 
@@ -127,41 +127,41 @@  discard block
 block discarded – undo
127 127
      * @var     array
128 128
      */
129 129
     protected $aDefaultKeys = array(
130
-        'taxonomy_slugs'        => 'category',      // (array|string) This is for the taxonomy field type.
131
-        'height'                => '250px',         // the tab box height
132
-        'width'                 => null,            // 3.5.7.2+ the tab box width
133
-        'max_width'             => '100%',          // for the taxonomy checklist field type, since 2.1.1.     
134
-        'show_post_count'       => true,            // (boolean) 3.2.0+ whether or not the post count associated with the term should be displayed or not.
130
+        'taxonomy_slugs'        => 'category', // (array|string) This is for the taxonomy field type.
131
+        'height'                => '250px', // the tab box height
132
+        'width'                 => null, // 3.5.7.2+ the tab box width
133
+        'max_width'             => '100%', // for the taxonomy checklist field type, since 2.1.1.     
134
+        'show_post_count'       => true, // (boolean) 3.2.0+ whether or not the post count associated with the term should be displayed or not.
135 135
         'attributes'            => array(),    
136
-        'select_all_button'     => true,            // (boolean|string) 3.3.0+ to change the label, set the label here
137
-        'select_none_button'    => true,            // (boolean|string) 3.3.0+ to change the label, set the label here                
138
-        '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.
139
-        '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.
136
+        'select_all_button'     => true, // (boolean|string) 3.3.0+ to change the label, set the label here
137
+        'select_none_button'    => true, // (boolean|string) 3.3.0+ to change the label, set the label here                
138
+        '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.
139
+        '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.
140 140
         'query'                 => array(       // (array)  3.3.2+ Defines the default query argument.
141 141
             // see the arguments of the get_category() function: http://codex.wordpress.org/Function_Reference/get_categories
142 142
             // see the argument of the get_terms() function: http://codex.wordpress.org/Function_Reference/get_terms        
143 143
             'child_of'          => 0,
144 144
             'parent'            => '',
145
-            'orderby'           => 'name',      // (string) 'ID' or 'term_id' or 'name'
146
-            'order'             => 'ASC',       // (string) 'ASC' or 'DESC'
147
-            'hide_empty'        => false,       // (boolean) whether to show the terms with no post associated. Default: false
148
-            'hierarchical'      => true,        // (boolean) whether to show the terms as a hierarchical tree.
149
-            'number'            => '',          // (integer) The maximum number of the terms to show.
150
-            'pad_counts'        => false,       // (boolean) whether to sum up the post counts with the child post counts.
151
-            'exclude'           => array(),     // (string) Comma separated term IDs to exclude from the list. for example `1` will remove the 'Uncategorized' category from the list.
145
+            'orderby'           => 'name', // (string) 'ID' or 'term_id' or 'name'
146
+            'order'             => 'ASC', // (string) 'ASC' or 'DESC'
147
+            'hide_empty'        => false, // (boolean) whether to show the terms with no post associated. Default: false
148
+            'hierarchical'      => true, // (boolean) whether to show the terms as a hierarchical tree.
149
+            'number'            => '', // (integer) The maximum number of the terms to show.
150
+            'pad_counts'        => false, // (boolean) whether to sum up the post counts with the child post counts.
151
+            'exclude'           => array(), // (string) Comma separated term IDs to exclude from the list. for example `1` will remove the 'Uncategorized' category from the list.
152 152
             'exclude_tree'      => array(), 
153
-            'include'           => array(),     // (string) Comma separated term IDs to include in the list.
153
+            'include'           => array(), // (string) Comma separated term IDs to include in the list.
154 154
             'fields'            => 'all', 
155 155
             'slug'              => '', 
156 156
             'get'               => '', 
157 157
             'name__like'        => '',
158 158
             'description__like' => '',
159 159
             'offset'            => '', 
160
-            'search'            => '',          // (string) The search keyword to get the term with.
160
+            'search'            => '', // (string) The search keyword to get the term with.
161 161
             'cache_domain'      => 'core',
162 162
         ),
163
-        '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.
164
-        'save_unchecked'        => true,        // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
163
+        '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.
164
+        'save_unchecked'        => true, // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
165 165
     );
166 166
     
167 167
     /**
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 
192 192
         $_aJSArray = json_encode( $this->aFieldTypeSlugs );
193 193
         
194
-        return parent::getScripts() . 
194
+        return parent::getScripts(). 
195 195
         // return 
196 196
 <<<JAVASCRIPTS
197 197
 /* For tabs */
@@ -412,22 +412,22 @@  discard block
 block discarded – undo
412 412
         // Parse
413 413
         $_aTabs         = array();
414 414
         $_aCheckboxes   = array();      
415
-        foreach( $this->getAsArray( $aField[ 'taxonomy_slugs' ] ) as $_isKey => $_sTaxonomySlug ) {
415
+        foreach ( $this->getAsArray( $aField[ 'taxonomy_slugs' ] ) as $_isKey => $_sTaxonomySlug ) {
416 416
             $_aAssociatedDataAttributes = $this->_getDataAttributesOfAssociatedPostTypes( 
417 417
                 $_sTaxonomySlug, 
418 418
                 $this->_getPostTypesByTaxonomySlug( $_sTaxonomySlug )
419 419
             );
420
-            $_aTabs[]                   = $this->_getTaxonomyTab( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes );
421
-            $_aCheckboxes[]             = $this->_getTaxonomyCheckboxes( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes );
420
+            $_aTabs[ ]                   = $this->_getTaxonomyTab( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes );
421
+            $_aCheckboxes[ ]             = $this->_getTaxonomyCheckboxes( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes );
422 422
         }
423 423
 
424 424
         // Output
425
-        return "<div id='tabbox-{$aField['field_id']}' class='tab-box-container categorydiv' style='max-width:{$aField['max_width']};'>"
425
+        return "<div id='tabbox-{$aField[ 'field_id' ]}' class='tab-box-container categorydiv' style='max-width:{$aField[ 'max_width' ]};'>"
426 426
                 . "<ul class='tab-box-tabs category-tabs'>" 
427 427
                     . implode( PHP_EOL, $_aTabs ) 
428 428
                 . "</ul>" 
429 429
                 . "<div class='tab-box-contents-container'>"
430
-                    . "<div class='tab-box-contents' style='height: {$aField['height']};'>"
430
+                    . "<div class='tab-box-contents' style='height: {$aField[ 'height' ]};'>"
431 431
                         . implode( PHP_EOL, $_aCheckboxes )
432 432
                     . "</div>"
433 433
                 . "</div>" 
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
         private function _getDataAttributesOfAssociatedPostTypes( $sTaxonomySlusg, $aPostTypes ) {
454 454
             return array(
455 455
                 'data-associated-with'       => $sTaxonomySlusg,
456
-                'data-associated-post-types' => implode( ',', $aPostTypes ) . ',',  // must add a trailing comma for jQuery to detect the item.
456
+                'data-associated-post-types' => implode( ',', $aPostTypes ).',', // must add a trailing comma for jQuery to detect the item.
457 457
             );
458 458
         }
459 459
     
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
         private function _getTaxonomyCheckboxes( array $aField, $sKey, $sTaxonomySlug, $aAttributes ) {
469 469
             
470 470
             $_aTabBoxContainerArguments = array(
471
-                'id'    => "tab_{$aField['input_id']}_{$sKey}",
471
+                'id'    => "tab_{$aField[ 'input_id' ]}_{$sKey}",
472 472
                 'class' => 'tab-box-content',
473 473
                 'style' => $this->getInlineCSS(
474 474
                     array(
@@ -477,9 +477,9 @@  discard block
 block discarded – undo
477 477
                     )
478 478
                 ),
479 479
             ) + $aAttributes;
480
-            return "<div " . $this->getAttributes( $_aTabBoxContainerArguments ) . ">"
480
+            return "<div ".$this->getAttributes( $_aTabBoxContainerArguments ).">"
481 481
                     . $this->getElement( $aField, array( 'before_label', $sKey ) )
482
-                    . "<div " . $this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ) . ">"
482
+                    . "<div ".$this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ).">"
483 483
                     . "</div>"
484 484
                     . "<ul class='list:category taxonomychecklist form-no-clear'>"
485 485
                         . $this->_getTaxonomyChecklist( $aField, $sKey, $sTaxonomySlug )
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
                         'taxonomy'              => $sTaxonomySlug, 
505 505
                         '_name_prefix'          => is_array( $aField[ 'taxonomy_slugs' ] ) 
506 506
                             ? "{$aField[ '_input_name' ]}[{$sTaxonomySlug}]" 
507
-                            : $aField[ '_input_name' ],   // name prefix of the input
507
+                            : $aField[ '_input_name' ], // name prefix of the input
508 508
                         '_input_id_prefix'      => $aField[ 'input_id' ],
509 509
                         '_attributes'           => $this->getElementAsArray( 
510 510
                             $aField, 
@@ -512,12 +512,12 @@  discard block
 block discarded – undo
512 512
                         ) + $aField[ 'attributes' ],                 
513 513
                         
514 514
                         // checked items ( term IDs ) e.g.  array( 6, 10, 7, 15 ), 
515
-                        '_selected_items'       => $this->_getSelectedKeyArray( $aField['value'], $sTaxonomySlug ),
515
+                        '_selected_items'       => $this->_getSelectedKeyArray( $aField[ 'value' ], $sTaxonomySlug ),
516 516
                         
517
-                        'echo'                  => false,  // returns the output
518
-                        'show_post_count'       => $aField[ 'show_post_count' ],      // 3.2.0+
519
-                        'show_option_none'      => $aField[ 'label_no_term_found' ],  // 3.3.2+ 
520
-                        'title_li'              => $aField[ 'label_list_title' ],     // 3.3.2+
517
+                        'echo'                  => false, // returns the output
518
+                        'show_post_count'       => $aField[ 'show_post_count' ], // 3.2.0+
519
+                        'show_option_none'      => $aField[ 'label_no_term_found' ], // 3.3.2+ 
520
+                        'title_li'              => $aField[ 'label_list_title' ], // 3.3.2+
521 521
                         
522 522
                         '_save_unchecked'       => $aField[ 'save_unchecked' ], // 3.8.8+ Whether to insert hidden input element for unchecked.
523 523
                     ) 
@@ -564,8 +564,8 @@  discard block
 block discarded – undo
564 564
             $_aLiAttribues = array(
565 565
                 'class' => 'tab-box-tab',
566 566
             ) + $aAttributes;
567
-            return "<li " . $this->getAttributes( $_aLiAttribues ) . ">"
568
-                    . "<a href='#tab_{$aField['input_id']}_{$sKey}'>"
567
+            return "<li ".$this->getAttributes( $_aLiAttribues ).">"
568
+                    . "<a href='#tab_{$aField[ 'input_id' ]}_{$sKey}'>"
569 569
                         . "<span class='tab-box-tab-text'>" 
570 570
                             . $this->_getLabelFromTaxonomySlug( $sTaxonomySlug )
571 571
                         . "</span>"
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller_Menu.php 4 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,6 +74,8 @@  discard block
 block discarded – undo
74 74
      *  <li>a base64-encoded SVG using a data URI, which will be colored to match the color scheme. This should begin with 'data:image/svg+xml;base64,'.</li>
75 75
      * </ul>
76 76
      * @param       string      (optional) the position number that is passed to the <var>$position</var> parameter of the <a href="http://codex.wordpress.org/Function_Reference/add_menu_page">add_menu_page()</a> function.
77
+     * @param string $sIcon16x16
78
+     * @param integer $iMenuPosition
77 79
      * @return      void
78 80
      */
79 81
     public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16=null, $iMenuPosition=null ) {
@@ -96,6 +98,7 @@  discard block
 block discarded – undo
96 98
          * 
97 99
          * @since       2.0.0
98 100
          * @internal
101
+         * @param string $sMenuLabel
99 102
          * @return      void|string     Returns the associated slug string, if true.
100 103
          */ 
101 104
         private function _isBuiltInMenuItem( $sMenuLabel ) {
@@ -160,9 +163,6 @@  discard block
 block discarded – undo
160 163
      * @since        3.0.0       Changed the scope to public.
161 164
      * @remark       The sub menu page slug should be unique because add_submenu_page() can add one callback per page slug.
162 165
      * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
163
-     * @param        array       $aSubMenuItem1      a first sub-menu array. A sub-menu array can be a link or a page. For the specifications of the array structures and its arguments, refer to the parameter section of the `addSubMenuItem()` method.
164
-     * @param        array       $aSubMenuItem2      (optional) a second sub-menu array.
165
-     * @param        array       $_and_more          (optional) a third and add items as many as necessary with next parameters.
166 166
      * @access       public
167 167
      * @return       void
168 168
      */     
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -250,20 +250,20 @@
 block discarded – undo
250 250
     }
251 251
 
252 252
     /**
253
-    * Adds the given link into the menu on the left sidebar of the administration panel.
254
-    * 
255
-    * @since        2.0.0
256
-    * @since        3.0.0       Changed the scope to public from protected.
257
-    * @since        3.5.0       Changed the scope to public as it was still protected.
258
-    * @param        string      the menu title.
259
-    * @param        string      the URL linked to the menu.
260
-    * @param        string      (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>.
261
-    * @param        string      (optional) the order number. The larger it is, the lower the position it gets.
262
-    * @param        string      (optional) if set to false, the menu title will not be listed in the tab navigation menu at the top of the page.
263
-    * @access       public
264
-    * @return       void
265
-    * @internal
266
-    */    
253
+     * Adds the given link into the menu on the left sidebar of the administration panel.
254
+     * 
255
+     * @since        2.0.0
256
+     * @since        3.0.0       Changed the scope to public from protected.
257
+     * @since        3.5.0       Changed the scope to public as it was still protected.
258
+     * @param        string      the menu title.
259
+     * @param        string      the URL linked to the menu.
260
+     * @param        string      (optional) the <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank">access level</a>.
261
+     * @param        string      (optional) the order number. The larger it is, the lower the position it gets.
262
+     * @param        string      (optional) if set to false, the menu title will not be listed in the tab navigation menu at the top of the page.
263
+     * @access       public
264
+     * @return       void
265
+     * @internal
266
+     */    
267 267
     public function addSubMenuLink( array $aSubMenuLink ) {
268 268
         
269 269
         // If required keys are not set, return.
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @param       string      (optional) the position number that is passed to the <var>$position</var> parameter of the <a href="http://codex.wordpress.org/Function_Reference/add_menu_page">add_menu_page()</a> function.
77 77
      * @return      void
78 78
      */
79
-    public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16=null, $iMenuPosition=null ) {
79
+    public function setRootMenuPage( $sRootMenuLabel, $sIcon16x16 = null, $iMenuPosition = null ) {
80 80
 
81 81
         $sRootMenuLabel = trim( $sRootMenuLabel );
82 82
         $_sSlug         = $this->_isBuiltInMenuItem( $sRootMenuLabel ); // if true, this method returns the slug
@@ -267,16 +267,16 @@  discard block
 block discarded – undo
267 267
     public function addSubMenuLink( array $aSubMenuLink ) {
268 268
         
269 269
         // If required keys are not set, return.
270
-        if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { 
270
+        if ( !isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { 
271 271
             return; 
272 272
         }
273 273
         
274 274
         // If the set URL is not valid, return.
275
-        if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { 
275
+        if ( !filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { 
276 276
             return; 
277 277
         }
278 278
 
279
-        $_oFormatter   = new AdminPageFramework_Format_SubMenuLink( 
279
+        $_oFormatter = new AdminPageFramework_Format_SubMenuLink( 
280 280
             $aSubMenuLink, 
281 281
             $this,
282 282
             count( $this->oProp->aPages ) + 1
@@ -334,11 +334,11 @@  discard block
 block discarded – undo
334 334
      */ 
335 335
     public function addSubMenuPage( array $aSubMenuPage ) {
336 336
 
337
-        if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { 
337
+        if ( !isset( $aSubMenuPage[ 'page_slug' ] ) ) { 
338 338
             return; 
339 339
         }
340 340
             
341
-        $_oFormatter   = new AdminPageFramework_Format_SubMenuPage( 
341
+        $_oFormatter = new AdminPageFramework_Format_SubMenuPage( 
342 342
             $aSubMenuPage,
343 343
             $this,
344 344
             count( $this->oProp->aPages ) + 1
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -267,12 +267,12 @@  discard block
 block discarded – undo
267 267
     public function addSubMenuLink( array $aSubMenuLink ) {
268 268
         
269 269
         // If required keys are not set, return.
270
-        if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) { 
270
+        if ( ! isset( $aSubMenuLink[ 'href' ], $aSubMenuLink[ 'title' ] ) ) {
271 271
             return; 
272 272
         }
273 273
         
274 274
         // If the set URL is not valid, return.
275
-        if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) { 
275
+        if ( ! filter_var( $aSubMenuLink[ 'href' ], FILTER_VALIDATE_URL ) ) {
276 276
             return; 
277 277
         }
278 278
 
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
      */ 
335 335
     public function addSubMenuPage( array $aSubMenuPage ) {
336 336
 
337
-        if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) { 
337
+        if ( ! isset( $aSubMenuPage[ 'page_slug' ] ) ) {
338 338
             return; 
339 339
         }
340 340
             
Please login to merge, or discard this patch.
development/admin-page-framework.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  * @package     AdminPageFramework
11 11
  */
12 12
 
13
-if ( ! class_exists( 'AdminPageFramework_Registry', false ) ) :
13
+if ( !class_exists( 'AdminPageFramework_Registry', false ) ) :
14 14
 /**
15 15
  * Facilitates WordPress plugin and theme development.
16 16
  *
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 final class AdminPageFramework_Registry extends AdminPageFramework_Registry_Base {
62 62
 
63 63
     const TEXT_DOMAIN        = 'admin-page-framework';
64
-    const TEXT_DOMAIN_PATH   = '/language';  // not used at the moment
64
+    const TEXT_DOMAIN_PATH   = '/language'; // not used at the moment
65 65
 
66 66
     /**
67 67
      * Indicates whether the framework is loaded from the minified version or not.
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
      * Sets up static properties.
104 104
      * @return      void
105 105
      */
106
-    static public function setUp( $sFilePath=__FILE__ ) {
106
+    static public function setUp( $sFilePath = __FILE__ ) {
107 107
 
108 108
         self::$sFilePath                = $sFilePath;
109 109
         self::$sDirPath                 = dirname( self::$sFilePath );
110
-        self::$sIncludeClassListPath    = self::$sDirPath . '/admin-page-framework-include-class-list.php';
110
+        self::$sIncludeClassListPath    = self::$sDirPath.'/admin-page-framework-include-class-list.php';
111 111
         self::$aClassFiles              = self::_getClassFilePathList( self::$sIncludeClassListPath );
112 112
         self::$sAutoLoaderPath          = isset( self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ] )
113 113
             ? self::$aClassFiles[ 'AdminPageFramework_RegisterClasses' ]
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
          * @return      array
123 123
          */
124 124
         static private function _getClassFilePathList( $sInclusionClassListPath ) {
125
-            $aClassFiles = array();    // this will be updated if the inclusion below is successful.
125
+            $aClassFiles = array(); // this will be updated if the inclusion below is successful.
126 126
             include( $sInclusionClassListPath );
127 127
             return $aClassFiles;
128 128
         }
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
      */
136 136
     static public function getVersion() {
137 137
 
138
-        if ( ! isset( self::$sAutoLoaderPath ) ) {
139
-            trigger_error( self::NAME . ': ' . ' : ' . sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING );
138
+        if ( !isset( self::$sAutoLoaderPath ) ) {
139
+            trigger_error( self::NAME.': '.' : '.sprintf( __( 'The method is called too early. Perform <code>%2$s</code> earlier.', 'admin-page-framework' ), __METHOD__, 'setUp()' ), E_USER_WARNING );
140 140
             return self::VERSION;
141 141
         }
142
-        $_aMinifiedVesionSuffix     = array(
142
+        $_aMinifiedVesionSuffix = array(
143 143
             0 => '',
144 144
             1 => '.min',
145 145
         );
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 }
169 169
 endif;
170 170
 
171
-if ( ! class_exists( 'AdminPageFramework_Bootstrap', false ) ) :
171
+if ( !class_exists( 'AdminPageFramework_Bootstrap', false ) ) :
172 172
 /**
173 173
  * Loads the Admin Page Framework library.
174 174
  *
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      */
190 190
     public function __construct( $sLibraryPath ) {
191 191
 
192
-        if ( ! $this->_isLoadable() ) {
192
+        if ( !$this->_isLoadable() ) {
193 193
             return;
194 194
         }
195 195
 
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___SectionTitle.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
                                     . $this->getFrameworkNameVersion()
159 159
                                     . '  ('
160 160
                                         . $this->oMsg->get( 'debug_info_will_be_disabled' )
161
-                                      . ')'
161
+                                        . ')'
162 162
                                 . '</span>',
163 163
                             'attributes'    => array(
164 164
                                 'container' => array(
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
  */
18 18
 class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base {            
19 19
   
20
-    public $aArguments      = array(
20
+    public $aArguments = array(
21 21
         'title'         => null,
22 22
         'tag'           => null,
23 23
         'section_index' => null,
24 24
         
25 25
         'sectionset'    => array(),
26 26
     );
27
-    public $aFieldsets               = array();
27
+    public $aFieldsets = array();
28 28
     public $aSavedData              = array();
29 29
     public $aFieldErrors            = array();
30 30
     public $aFieldTypeDefinitions   = array();
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
          * @since       3.7.0      Moved from `AdminPageFramework_FormPart_SectionTitle`.
91 91
          * @return      string      The section title output. 
92 92
          */
93
-        protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex=null, $aFieldTypeDefinitions=array(), $aCollapsible=array() ) {
93
+        protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex = null, $aFieldTypeDefinitions = array(), $aCollapsible = array() ) {
94 94
 
95 95
             $_aSectionTitleFieldset = $this->_getSectionTitleField( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions );
96 96
             $_sFieldsInSectionTitle = $this->_getFieldsetsOutputInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions );
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             $_bHasOtherFields       = $_sFieldsInSectionTitle
101 101
                 ? ' has-fields'
102 102
                 : '';
103
-            $_sOutput               = $_sTitle . $_sFieldsInSectionTitle;
103
+            $_sOutput               = $_sTitle.$_sFieldsInSectionTitle;
104 104
             return $_sOutput
105 105
                 ? "<div class='section-title-height-fixer'></div>"
106 106
                 . "<div class='section-title-outer-container'>" // 3.8.13+ For vertical alignment
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                  * @return      string
133 133
                  */
134 134
                 private function _getToolTip( $_aSectionset ) {
135
-                    $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ]  ) . '_' . $this->aArguments[ 'section_index' ];
135
+                    $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ).'_'.$this->aArguments[ 'section_index' ];
136 136
                     $_oToolTip           = new AdminPageFramework_Form_View___ToolTip(
137 137
                         $_aSectionset[ 'tip' ],
138 138
                         $_sSectionTitleTagID
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
                  */
148 148
                 private function _getDebugInfo( $aSectionset ) {
149 149
                                         
150
-                    if ( ! $aSectionset[ 'show_debug_info' ] ) {
150
+                    if ( !$aSectionset[ 'show_debug_info' ] ) {
151 151
                         return '';
152 152
                     }
153
-                    $_oToolTip           = new AdminPageFramework_Form_View___ToolTip(
153
+                    $_oToolTip = new AdminPageFramework_Form_View___ToolTip(
154 154
                         array(
155 155
                             'title'         => $this->oMsg->get( 'section_arguments' ),
156 156
                             'dash-icon'     => 'dashicons-info',
157
-                            'icon_alt_text' => '[' . $this->oMsg->get( 'debug' ) . ' ]',
157
+                            'icon_alt_text' => '['.$this->oMsg->get( 'debug' ).' ]',
158 158
                             'content'       => AdminPageFramework_Debug::getDetails( $aSectionset )
159 159
                                 . '<span class="admin-page-framework-info">'
160 160
                                     . $this->getFrameworkNameVersion()
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                                 ),
169 169
                             )
170 170
                         ),
171
-                        $aSectionset[ '_section_path' ] . '_debug'
171
+                        $aSectionset[ '_section_path' ].'_debug'
172 172
                     );            
173 173
                     return $_oToolTip->get();                    
174 174
                     
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
             private function _getFieldsetsOutputInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) {   
198 198
 
199 199
                 $_sOutput = '';
200
-                foreach( $this->_getFieldsetsInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) as $_aFieldset ) {
201
-                    if ( empty( $_aFieldset ) )  {
200
+                foreach ( $this->_getFieldsetsInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) as $_aFieldset ) {
201
+                    if ( empty( $_aFieldset ) ) {
202 202
                         continue;
203 203
                     }
204 204
                     $_sOutput .= $this->getFieldsetOutput( $_aFieldset );
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                 private function _getFieldsetsInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) {
215 215
                     
216 216
                     $_aFieldsetsInSectionTitle = array();
217
-                    foreach( $aFieldsets as $_aFieldset ) {
217
+                    foreach ( $aFieldsets as $_aFieldset ) {
218 218
                         
219 219
                         if ( 'section_title' !== $_aFieldset[ 'placement' ] ) {
220 220
                             continue;
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                             $iSectionIndex,
226 226
                             $aFieldTypeDefinitions
227 227
                         );         
228
-                        $_aFieldsetsInSectionTitle[] = $_oFieldsetOutputFormatter->get();
228
+                        $_aFieldsetsInSectionTitle[ ] = $_oFieldsetOutputFormatter->get();
229 229
                         
230 230
                     }
231 231
                     return $_aFieldsetsInSectionTitle;
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                  */
245 245
                 private function _getSectionTitleField( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) {   
246 246
                 
247
-                    foreach( $aFieldsets as $_aFieldset ) {
247
+                    foreach ( $aFieldsets as $_aFieldset ) {
248 248
                         
249 249
                         if ( 'section_title' !== $_aFieldset[ 'type' ] ) {
250 250
                             continue;
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * @since       3.7.0      Changed the name from `AdminPageFramework_FormPart_SectionTitle`.
16 16
  * @internal
17 17
  */
18
-class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base {            
18
+class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base {
19 19
   
20 20
     public $aArguments      = array(
21 21
         'title'         => null,
@@ -194,11 +194,11 @@  discard block
 block discarded – undo
194 194
              * @since       3.8.0
195 195
              * @internal
196 196
              */
197
-            private function _getFieldsetsOutputInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) {   
197
+            private function _getFieldsetsOutputInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) {
198 198
 
199 199
                 $_sOutput = '';
200 200
                 foreach( $this->_getFieldsetsInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) as $_aFieldset ) {
201
-                    if ( empty( $_aFieldset ) )  {
201
+                    if ( empty( $_aFieldset ) ) {
202 202
                         continue;
203 203
                     }
204 204
                     $_sOutput .= $this->getFieldsetOutput( $_aFieldset );
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                  * @since       3.7.0       Moved from `AdminPageFramework_FormPart_SectionTitle`.
243 243
                  * @return      array|void
244 244
                  */
245
-                private function _getSectionTitleField( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) {   
245
+                private function _getSectionTitleField( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) {
246 246
                 
247 247
                     foreach( $aFieldsets as $_aFieldset ) {
248 248
                         
Please login to merge, or discard this patch.
form/_model/formatter/AdminPageFramework_Form_Model___Format_Fieldset.php 2 patches
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -29,38 +29,38 @@  discard block
 block discarded – undo
29 29
     static public $aStructure = array(
30 30
     
31 31
         // Required Keys
32
-        'field_id'                  => null,    // (string)
33
-        'section_id'                => null,    // (string)
32
+        'field_id'                  => null, // (string)
33
+        'section_id'                => null, // (string)
34 34
 
35 35
         // Optional Keys        
36
-        'type'                      => null,    // (string) (3.8.0+ Became okay to omit.)
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.
36
+        'type'                      => null, // (string) (3.8.0+ Became okay to omit.)
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
-        'placement'                 => 'normal',    // 3.8.0 (string) accepts either 'section_title', 'field_title', or 'normal'
60
+        'placement'                 => 'normal', // 3.8.0 (string) accepts either 'section_title', 'field_title', or 'normal'
61 61
         
62 62
         // @todo    Examine why an array is not set but null here for the attributes argument.
63
-        'attributes'                => null,    // 3.0.0 - the array represents the attributes of input tag
63
+        'attributes'                => null, // 3.0.0 - the array represents the attributes of input tag
64 64
         'class'                     => array(   // 3.3.1
65 65
             'fieldrow'  =>  array(),
66 66
             'fieldset'  =>  array(),
@@ -68,29 +68,29 @@  discard block
 block discarded – undo
68 68
             'field'     =>  array(),
69 69
         ), 
70 70
 
71
-        'save'                      => true,    // 3.6.0
72
-        'content'                   => null,    // 3.6.1 - (string) An overriding field-set output.
71
+        'save'                      => true, // 3.6.0
72
+        'content'                   => null, // 3.6.1 - (string) An overriding field-set output.
73 73
         
74
-        'show_debug_info'           => null,    // 3.8.8+  (boolean) whether to show debug information such as field definition tool-tips. This value is inherited from the section definition argument of the same name. Not setting a value here as it is determined with another calculated value.
74
+        'show_debug_info'           => null, // 3.8.8+  (boolean) whether to show debug information such as field definition tool-tips. This value is inherited from the section definition argument of the same name. Not setting a value here as it is determined with another calculated value.
75 75
         
76 76
         // Internal Keys
77
-        '_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.
78
-        '_structure_type'           => null,    // 3.7.0
79
-        '_caller_object'            => null,    // 3.4.0 (object) stores the object of the caller class. The object is referenced when creating nested fields.
77
+        '_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.
78
+        '_structure_type'           => null, // 3.7.0
79
+        '_caller_object'            => null, // 3.4.0 (object) stores the object of the caller class. The object is referenced when creating nested fields.
80 80
                                                          
81
-        '_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
82
-        '_section_path_array'       => '',      // 3.7.0 (array) An array version of the above section path.
83
-        '_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.        
84
-        '_subsection_index'         => null,    // 3.7.0 Passed to the `field_definition_{...}` filter hook callbacks.
85
-        '_section_repeatable'       => false,   // @deprecated
86
-        '_is_section_repeatable'    => false,   // 3.8.0 (boolean) Whether the belonging section is repeatable or not.
81
+        '_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
82
+        '_section_path_array'       => '', // 3.7.0 (array) An array version of the above section path.
83
+        '_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.        
84
+        '_subsection_index'         => null, // 3.7.0 Passed to the `field_definition_{...}` filter hook callbacks.
85
+        '_section_repeatable'       => false, // @deprecated
86
+        '_is_section_repeatable'    => false, // 3.8.0 (boolean) Whether the belonging section is repeatable or not.
87 87
                
88
-        '_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.
88
+        '_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.
89 89
         '_field_path_array'         => array(), // 3.7.0 (array) An array version of the above field path.
90
-        '_parent_field_path'        => '',      // 3.8.0 (string)
90
+        '_parent_field_path'        => '', // 3.8.0 (string)
91 91
         '_parent_field_path_array'  => array(), // 3.8.0 (array)
92 92
         
93
-        '_is_title_embedded'        => false,   // 3.8.0 (boolean) whether the field title is in the fieldset element, not in the table th element. This becomes `true` for `section_title` fields and fields with the `placement` argument with the value of `section_title` or `field_title`.
93
+        '_is_title_embedded'        => false, // 3.8.0 (boolean) whether the field title is in the fieldset element, not in the table th element. This becomes `true` for `section_title` fields and fields with the `placement` argument with the value of `section_title` or `field_title`.
94 94
         
95 95
     );        
96 96
     
@@ -167,14 +167,14 @@  discard block
 block discarded – undo
167 167
             array( 
168 168
                 '_fields_type'           => $this->sStructureType, // @deprecated 3.7.0 backward-compatibility
169 169
                 '_structure_type'        => $this->sStructureType,  
170
-                '_caller_object'         => $this->oCallerObject,  // 3.4.1+ Stores the caller form object. 
171
-                '_subsection_index'      => $this->iSubSectionIndex,  // 3.7.0+
170
+                '_caller_object'         => $this->oCallerObject, // 3.4.1+ Stores the caller form object. 
171
+                '_subsection_index'      => $this->iSubSectionIndex, // 3.7.0+
172 172
             )
173 173
             + $this->aFieldset,
174 174
             array( 
175 175
                 'capability'             => $this->sCapability,
176 176
                 'section_id'             => '_default',             
177
-                '_section_repeatable'    => $this->bIsSectionRepeatable,   // @deprecated  3.8.0   This was not used.
177
+                '_section_repeatable'    => $this->bIsSectionRepeatable, // @deprecated  3.8.0   This was not used.
178 178
                 '_is_section_repeatable' => $this->bIsSectionRepeatable,
179 179
             )
180 180
             + self::$aStructure
@@ -295,12 +295,12 @@  discard block
 block discarded – undo
295 295
           
296 296
             );
297 297
 
298
-            foreach( $aNestedFieldsets as $_isIndex => &$_aNestedFieldset ) {
298
+            foreach ( $aNestedFieldsets as $_isIndex => &$_aNestedFieldset ) {
299 299
                 
300 300
                 // The inline-mixed type has a string element.
301 301
                 if ( is_scalar( $_aNestedFieldset ) ) {                    
302 302
                     $_aNestedFieldset = array( 
303
-                        'field_id'              => $aParentFieldset[ 'field_id' ] . '_' . uniqid(),
303
+                        'field_id'              => $aParentFieldset[ 'field_id' ].'_'.uniqid(),
304 304
                         'content'               => $_aNestedFieldset,
305 305
                     );                    
306 306
                 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         $_aFieldset[ 'class' ] = $this->getAsArray( $_aFieldset[ 'class' ] );
196 196
 
197 197
         // 3.8.0+ Support nested fields and inline_mized field type.
198
-        if ( $this->hasFieldDefinitionsInContent( $_aFieldset ) ) {        
198
+        if ( $this->hasFieldDefinitionsInContent( $_aFieldset ) ) {
199 199
             $_aFieldset[ 'content' ] = $this->_getChildFieldsetsFormatted( $_aFieldset[ 'content' ], $_aFieldset );
200 200
         }        
201 201
         
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
          * @since       3.8.8
223 223
          * @return      boolean
224 224
          */
225
-        private function _getShowDebugInfo( $aFieldset ) {   
225
+        private function _getShowDebugInfo( $aFieldset ) {
226 226
 
227 227
             // If the user sets a value. use it.
228 228
             if ( isset( $aFieldset[ 'show_debug_info' ] ) ) {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
             foreach( $aNestedFieldsets as $_isIndex => &$_aNestedFieldset ) {
299 299
                 
300 300
                 // The inline-mixed type has a string element.
301
-                if ( is_scalar( $_aNestedFieldset ) ) {                    
301
+                if ( is_scalar( $_aNestedFieldset ) ) {
302 302
                     $_aNestedFieldset = array( 
303 303
                         'field_id'              => $aParentFieldset[ 'field_id' ] . '_' . uniqid(),
304 304
                         'content'               => $_aNestedFieldset,
Please login to merge, or discard this patch.
form/_model/formatter/AdminPageFramework_Form_Model___FormatSectionset.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -35,47 +35,47 @@  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.
76 76
         '_caller_object'    => null,     
77 77
         
78
-        'show_debug_info'   => null,    // 3.8.8+ (boolean) Whether to display debug information. Inherits the page/in-page-tab setting (actually the factory property value of `$bShowDebugInfo` which gets updated by the page/tab setting).
78
+        'show_debug_info'   => null, // 3.8.8+ (boolean) Whether to display debug information. Inherits the page/in-page-tab setting (actually the factory property value of `$bShowDebugInfo` which gets updated by the page/tab setting).
79 79
         
80 80
     );        
81 81
     
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     
95 95
     public $oCaller             = null;
96 96
     
97
-    public $bShowDebugInfo      = true;     // 3.8.8+
97
+    public $bShowDebugInfo      = true; // 3.8.8+
98 98
     
99 99
     /**
100 100
      * Sets up properties.
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             $this->sCapability, 
109 109
             $this->iCountOfElements,
110 110
             $this->oCaller,
111
-            $this->bShowDebugInfo,      // 3.8.8+
111
+            $this->bShowDebugInfo, // 3.8.8+
112 112
         );
113 113
         $this->aSectionset          = $_aParameters[ 0 ];
114 114
         $this->sSectionPath         = $_aParameters[ 1 ];
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $this->sCapability          = $_aParameters[ 3 ];
117 117
         $this->iCountOfElements     = $_aParameters[ 4 ];
118 118
         $this->oCaller              = $_aParameters[ 5 ];
119
-        $this->bShowDebugInfo       = $_aParameters[ 6 ];   // 3.8.8+
119
+        $this->bShowDebugInfo       = $_aParameters[ 6 ]; // 3.8.8+
120 120
 
121 121
     }
122 122
     
@@ -131,16 +131,16 @@  discard block
 block discarded – undo
131 131
         $_aSectionPath = explode( '|', $this->sSectionPath );
132 132
         $_aSectionset  = $this->uniteArrays(
133 133
             array( 
134
-                '_fields_type'          => $this->sStructureType,   // @deprecated  3.7.0+
135
-                '_structure_type'       => $this->sStructureType,   // 3.7.0+
136
-                '_section_path'         => $this->sSectionPath,     // 3.7.0+
134
+                '_fields_type'          => $this->sStructureType, // @deprecated  3.7.0+
135
+                '_structure_type'       => $this->sStructureType, // 3.7.0+
136
+                '_section_path'         => $this->sSectionPath, // 3.7.0+
137 137
                 '_section_path_array'   => $_aSectionPath,
138
-                '_nested_depth'         => count( $_aSectionPath ) - 1,    // 3.7.0+ - zero base
138
+                '_nested_depth'         => count( $_aSectionPath ) - 1, // 3.7.0+ - zero base
139 139
             ) 
140 140
             + $this->aSectionset
141 141
             + array(
142 142
                 'capability'        => $this->sCapability,
143
-                'show_debug_info'   => $this->bShowDebugInfo,   // 3.8.8+
143
+                'show_debug_info'   => $this->bShowDebugInfo, // 3.8.8+
144 144
             ),
145 145
             self::$aStructure
146 146
         );
Please login to merge, or discard this patch.
_common/form/field_type/AdminPageFramework_FieldType_inline_mixed.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -218,8 +218,8 @@
 block discarded – undo
218 218
      * @remark $_aDefaultKeys holds shared default key-values defined in the base class.
219 219
      */
220 220
     protected $aDefaultKeys = array(
221
-        'label_min_width'  => '',       // disabled as the embedded elements are all inline.
222
-        'show_debug_info'  => false,    // 3.8.8+ @todo Examine why this value does not override the default value of field definition arguments and if possible and appropriate, override it.
221
+        'label_min_width'  => '', // disabled as the embedded elements are all inline.
222
+        'show_debug_info'  => false, // 3.8.8+ @todo Examine why this value does not override the default value of field definition arguments and if possible and appropriate, override it.
223 223
     );
224 224
 
225 225
     
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
      * @internal
230 230
      * @return      string
231 231
      */        
232
-    protected function getStyles() { 
232
+    protected function getStyles() {
233 233
         return <<<CSSRULES
234 234
 .admin-page-framework-field-inline_mixed {
235 235
     width: 98%;
Please login to merge, or discard this patch.