Completed
Branch master (acc4ae)
by
unknown
03:44
created
admin_page/_view/AdminPageFramework_View__PageRenderer__PageHeadingTabs.php 3 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -60,6 +60,7 @@  discard block
 block discarded – undo
60 60
          * @since       3.3.1       Moved from `AdminPageFramework_Page`.
61 61
          * @since       3.5.3       Deprecated the `$aOutput` parameter.
62 62
          * @since       3.6.3       Moved from `AdminPageFramework_Page_View`. Changed the name from `_getPageHeadingTabs()`.
63
+         * @param string $sTag
63 64
          * @return      string      the output of page heading tabs.
64 65
          */
65 66
         private function _getOutput( $aPage, $sTag ) {
@@ -100,6 +101,7 @@  discard block
 block discarded – undo
100 101
              * @internal
101 102
              * @since       3.5.3
102 103
              * @since       3.6.3       Moved from `AdminPageFramework_Page_View`.
104
+             * @param string $sTag
103 105
              * @return      string      the HTML page heading tab navigation bar output.
104 106
              */
105 107
             private function _getPageHeadingtabNavigationBar( array $aPages, $sTag, $sCurrentPageSlug ) {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $_aPage = $this->oFactory->oProp->aPages[ $this->sPageSlug ];
46 46
         
47 47
         // If the page title is disabled, return an empty string.
48
-        if ( ! $_aPage[ 'show_page_title' ] ) { 
48
+        if ( !$_aPage[ 'show_page_title' ] ) { 
49 49
             return ""; 
50 50
         }
51 51
 
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
          */
65 65
         private function _getOutput( $aPage, $sTag ) {
66 66
    
67
-            $sTag  = $this->_getPageHeadingTabTag( $sTag, $aPage );
67
+            $sTag = $this->_getPageHeadingTabTag( $sTag, $aPage );
68 68
             
69 69
             // If the page heading tab visibility is disabled, or only one page is registered, return the title.
70
-            if ( ! $aPage[ 'show_page_heading_tabs' ] || count( $this->oFactory->oProp->aPages ) == 1 ) {
70
+            if ( !$aPage[ 'show_page_heading_tabs' ] || count( $this->oFactory->oProp->aPages ) == 1 ) {
71 71
                 return "<{$sTag}>" 
72 72
                         . $aPage[ 'title' ]  
73 73
                     . "</{$sTag}>";     
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
             private function _getPageHeadingtabNavigationBar( array $aPages, $sTag, $sCurrentPageSlug ) {
106 106
                 
107 107
                 $_oTabBar = new AdminPageFramework_TabNavigationBar(
108
-                    $aPages,     // tab items
108
+                    $aPages, // tab items
109 109
                     $sCurrentPageSlug, // active tab slug
110
-                    $sTag,       // container tag
110
+                    $sTag, // container tag
111 111
                     array(       // container attributes
112 112
                         // 'class' => '...',
113 113
                     ),
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
                  * @since           3.5.10
131 131
                  * @since       3.6.3       Moved from `AdminPageFramework_Page_View`.
132 132
                  */            
133
-                public function _replyToFormatNavigationTabItem_PageHeadingTab( $aSubPage, $aStructure, $aPages, $aArguments=array() ) {                    
134
-                    switch( $aSubPage['type'] ) {
133
+                public function _replyToFormatNavigationTabItem_PageHeadingTab( $aSubPage, $aStructure, $aPages, $aArguments = array() ) {                    
134
+                    switch ( $aSubPage[ 'type' ] ) {
135 135
                         case 'link':
136 136
                             return $this->_getFormattedPageHeadingtabNavigationBarLinkItem( $aSubPage, $aStructure );
137 137
                         default:
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
                      */
149 149
                     private function _getFormattedPageHeadingtabNavigationBarPageItem( array $aSubPage, $aStructure ) {
150 150
                         
151
-                        if ( ! isset( $aSubPage[ 'page_slug' ] ) ) {
151
+                        if ( !isset( $aSubPage[ 'page_slug' ] ) ) {
152 152
                             return array();
153 153
                         }
154
-                        if ( ! $aSubPage[ 'show_page_heading_tab' ] ) {
154
+                        if ( !$aSubPage[ 'show_page_heading_tab' ] ) {
155 155
                             return array();
156 156
                         }
157 157
                         return array(
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
                      */                    
183 183
                     private function _getFormattedPageHeadingtabNavigationBarLinkItem( array $aSubPage, $aStructure ) {
184 184
                         
185
-                        if ( ! isset( $aSubPage[ 'href' ] ) ) {
185
+                        if ( !isset( $aSubPage[ 'href' ] ) ) {
186 186
                             return array();
187 187
                         }
188
-                        if ( ! $aSubPage[ 'show_page_heading_tab' ] ) {
188
+                        if ( !$aSubPage[ 'show_page_heading_tab' ] ) {
189 189
                             return array();
190 190
                         }                        
191 191
                         $aSubPage = array(
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                             + array( 'class' => null )
198 198
                             + $aStructure;
199 199
                             
200
-                        $aSubPage[ 'class' ] = trim( $aSubPage[ 'class' ] . ' link' );
200
+                        $aSubPage[ 'class' ] = trim( $aSubPage[ 'class' ].' link' );
201 201
                         return $aSubPage;
202 202
                     }                      
203 203
                 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $_aPage = $this->oFactory->oProp->aPages[ $this->sPageSlug ];
46 46
         
47 47
         // If the page title is disabled, return an empty string.
48
-        if ( ! $_aPage[ 'show_page_title' ] ) { 
48
+        if ( ! $_aPage[ 'show_page_title' ] ) {
49 49
             return ""; 
50 50
         }
51 51
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                  * @since           3.5.10
131 131
                  * @since       3.6.3       Moved from `AdminPageFramework_Page_View`.
132 132
                  */            
133
-                public function _replyToFormatNavigationTabItem_PageHeadingTab( $aSubPage, $aStructure, $aPages, $aArguments=array() ) {                    
133
+                public function _replyToFormatNavigationTabItem_PageHeadingTab( $aSubPage, $aStructure, $aPages, $aArguments=array() ) {
134 134
                     switch( $aSubPage['type'] ) {
135 135
                         case 'link':
136 136
                             return $this->_getFormattedPageHeadingtabNavigationBarLinkItem( $aSubPage, $aStructure );
Please login to merge, or discard this patch.
admin_page/_view/AdminPageFramework_View__PageRenderer__ScreenIcon.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     }
49 49
         /**
50 50
          * @since       3.6.3
51
-         * @return      boolean
51
+         * @return      boolean|null
52 52
          */
53 53
         private function _isScreenIconVisible() {
54 54
             
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
          * @since       3.6.3       Moved from `AdminPageFramework_Page_View`.
182 182
          * @return      string      
183 183
          */
184
-        private function _getDefaultScreenIcon() {            
184
+        private function _getDefaultScreenIcon() {
185 185
 
186 186
             $_oScreen           = get_current_screen();
187 187
             $_sIconIDAttribute  = $this->_getScreenIDAttribute( $_oScreen );
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function get() {
42 42
         
43
-        if ( ! $this->_isScreenIconVisible() ) {
43
+        if ( !$this->_isScreenIconVisible() ) {
44 44
             return '';
45 45
         }
46 46
         return $this->_getScreenIcon( $this->sPageSlug );
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
          */
53 53
         private function _isScreenIconVisible() {
54 54
             
55
-            $_bShowPageTitle        = $this->getElement(
55
+            $_bShowPageTitle = $this->getElement(
56 56
                 $this->oFactory->oProp->aPages,
57 57
                 array( $this->sPageSlug, 'show_page_title' )
58 58
             );
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                 array( $sPageSlug, 'href_icon_32x32' ),
131 131
                 ''
132 132
             );
133
-            if ( ! $_sScreenIconPath ) {
133
+            if ( !$_sScreenIconPath ) {
134 134
                 return;
135 135
             }
136 136
             $_sScreenIconPath = $this->getResolvedSRC( 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             $_aAttributes = array(
141 141
                 'style'    => $this->getInlineCSS(
142 142
                     array(
143
-                        'background-image' => "url('" . esc_url( $_sScreenIconPath ) . "')"
143
+                        'background-image' => "url('".esc_url( $_sScreenIconPath )."')"
144 144
                     )
145 145
                 )
146 146
             );
@@ -164,12 +164,12 @@  discard block
 block discarded – undo
164 164
                 array( $sPageSlug, 'screen_icon_id' ),
165 165
                 ''
166 166
             );
167
-            if ( ! $_sScreenIconID ) {
167
+            if ( !$_sScreenIconID ) {
168 168
                 return;
169 169
             }
170 170
             
171 171
             $_aAttributes = array(
172
-                'id'       => "icon-" . $_sScreenIconID,
172
+                'id'       => "icon-".$_sScreenIconID,
173 173
             );
174 174
             
175 175
             // Go to the catch clause.
@@ -192,16 +192,16 @@  discard block
 block discarded – undo
192 192
                 'class'    => $this->getClassAttribute(
193 193
                     $this->getAOrB(
194 194
                         empty( $_sIconIDAttribute ) && $_oScreen->post_type,
195
-                        sanitize_html_class( 'icon32-posts-' . $_oScreen->post_type ),
195
+                        sanitize_html_class( 'icon32-posts-'.$_oScreen->post_type ),
196 196
                         ''
197 197
                     ),
198 198
                     $this->getAOrB(
199 199
                         empty( $_sIconIDAttribute ) || $_sIconIDAttribute == $this->oFactory->oProp->sClassName,
200
-                        'generic',  // the default value
200
+                        'generic', // the default value
201 201
                         ''
202 202
                     )
203 203
                 ),
204
-                'id'       => "icon-" . $_sIconIDAttribute,                
204
+                'id'       => "icon-".$_sIconIDAttribute,                
205 205
             );
206 206
             return $this->_getScreenIconByAttributes( $_aAttributes );
207 207
         
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
              */     
216 216
             private function _getScreenIDAttribute( $oScreen ) {
217 217
                 
218
-                if ( ! empty( $oScreen->parent_base ) ) {
218
+                if ( !empty( $oScreen->parent_base ) ) {
219 219
                     return $oScreen->parent_base;
220 220
                 }
221 221
                 if ( 'page' === $oScreen->post_type ) {
@@ -236,10 +236,10 @@  discard block
 block discarded – undo
236 236
             private function _getScreenIconByAttributes( array $aAttributes ) {
237 237
                 
238 238
                 $aAttributes[ 'class' ] = $this->getClassAttribute( 
239
-                    'icon32',   // required for a screen icon container element.
239
+                    'icon32', // required for a screen icon container element.
240 240
                     $this->getElement( $aAttributes, 'class' )
241 241
                 );
242
-                return "<div " . $this->getAttributes( $aAttributes ) . ">"
242
+                return "<div ".$this->getAttributes( $aAttributes ).">"
243 243
                         . "<br />"
244 244
                     . "</div>";
245 245
                 
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller_Form.php 4 patches
Doc Comments   -3 removed lines patch added patch discarded remove patch
@@ -153,9 +153,6 @@
 block discarded – undo
153 153
     * @since        3.5.3       Removed the parameter declarations as they are caught with the func_get_args().
154 154
     * @access       public
155 155
     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
156
-    * @param        string      $sSectionID1        the section ID to remove.
157
-    * @param        string      $sSectionID2        (optional) another section ID to remove.
158
-    * @param        string      $_and_more          (optional) add more section IDs to the next parameters as many as necessary.
159 156
     * @return       void
160 157
     */    
161 158
     public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {    
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */     
73 73
     public function addSettingSections( /* $aSection1, $aSection2=null, $_and_more=null */ ) {
74 74
         
75
-        foreach( func_get_args() as $asSection ) { 
75
+        foreach ( func_get_args() as $asSection ) { 
76 76
             $this->addSettingSection( $asSection ); 
77 77
         }
78 78
         
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function addSettingSection( $asSection ) {
97 97
                 
98
-        if ( ! is_array( $asSection ) ) {
98
+        if ( !is_array( $asSection ) ) {
99 99
             $this->_sTargetPageSlug = is_string( $asSection )
100 100
                 ? $asSection 
101 101
                 : $this->_sTargetPageSlug;
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
             )
118 118
         ); 
119 119
         
120
-        $aSection[ 'section_tab_slug' ]   = $this->oUtil->sanitizeSlug( $aSection[ 'section_tab_slug' ] );
120
+        $aSection[ 'section_tab_slug' ] = $this->oUtil->sanitizeSlug( $aSection[ 'section_tab_slug' ] );
121 121
         
122 122
         // A page slug is required.
123
-        if ( ! $aSection[ 'page_slug' ] ) {
123
+        if ( !$aSection[ 'page_slug' ] ) {
124 124
             return; 
125 125
         }
126 126
         $this->oForm->addSection( $aSection );
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
         private function _getTargetPageSlug( $aSection ) {
137 137
             
138 138
             $_sTargetPageSlug = $this->oUtil->getElement( 
139
-                $aSection,      // subject
140
-                'page_slug',    // key
139
+                $aSection, // subject
140
+                'page_slug', // key
141 141
                 $this->_sTargetPageSlug     // default
142 142
             );
143 143
          
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
          */
158 158
         private function _getTargetTabSlug( $aSection ) {
159 159
             $_sTargetTabSlug = $this->oUtil->getElement( 
160
-                $aSection,              // subject
161
-                'tab_slug',             // key
160
+                $aSection, // subject
161
+                'tab_slug', // key
162 162
                 $this->_sTargetTabSlug  // default
163 163
             );
164 164
             $_sTargetTabSlug = $_sTargetTabSlug
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     * @return       void
188 188
     */    
189 189
     public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {    
190
-        foreach( func_get_args() as $_sSectionID ) {
190
+        foreach ( func_get_args() as $_sSectionID ) {
191 191
             $this->oForm->removeSection( $_sSectionID );
192 192
         }        
193 193
     }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      * @remark      The actual registration will be performed in the <em>_replyToRegisterSettings()</em> method with the <em>admin_menu</em> hook.
246 246
      */     
247 247
     public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {    
248
-        foreach( func_get_args() as $aField ) { 
248
+        foreach ( func_get_args() as $aField ) { 
249 249
             $this->addSettingField( $aField ); 
250 250
         }
251 251
     }
@@ -282,8 +282,8 @@  discard block
 block discarded – undo
282 282
     * @param        string      $_and_more      (optional) add more field IDs to the next parameters as many as necessary.
283 283
     * @return void
284 284
     */    
285
-    public function removeSettingFields( $sFieldID1, $sFieldID2=null, $_and_more ) {
286
-        foreach( func_get_args() as $_sFieldID ) { 
285
+    public function removeSettingFields( $sFieldID1, $sFieldID2 = null, $_and_more ) {
286
+        foreach ( func_get_args() as $_sFieldID ) { 
287 287
             $this->oForm->removeField( $_sFieldID ); 
288 288
         }
289 289
     }    
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
             $this->oProp->sOptionKey, 
331 331
             empty( $_aParams ) 
332 332
                 ? null                  // will return the entire options array
333
-                : $_aDimensionalKeys,   // dimensional keys
333
+                : $_aDimensionalKeys, // dimensional keys
334 334
             $_mDefault, // default
335 335
             $this->getSavedOptions() + $this->oForm->getDefaultFormValues()
336 336
         );
@@ -349,21 +349,21 @@  discard block
 block discarded – undo
349 349
      * If the user has not submitted the form, the framework will try to return the default value set in the field definition array.
350 350
      * @deprecated  3.3.0
351 351
      */
352
-    public function getFieldValue( $sFieldID, $sSectionID='' ) {
352
+    public function getFieldValue( $sFieldID, $sSectionID = '' ) {
353 353
                                    
354 354
         $this->oUtil->showDeprecationNotice(
355
-            'The method,' . __METHOD__ . ',', // deprecated item
355
+            'The method,'.__METHOD__.',', // deprecated item
356 356
             'getValue()' // alternative
357 357
         );     
358 358
     
359 359
         $_aOptions = $this->oUtil->uniteArrays( $this->oProp->aOptions, $this->oForm->getDefaultFormValues() );
360 360
         /* If it's saved, return it */
361
-        if ( ! $sSectionID ) {
361
+        if ( !$sSectionID ) {
362 362
             if ( array_key_exists( $sFieldID, $_aOptions ) ) {
363 363
                 return $_aOptions[ $sFieldID ];
364 364
             }    
365 365
             // loop through section elements
366
-            foreach( $_aOptions as $aOptions ) {
366
+            foreach ( $_aOptions as $aOptions ) {
367 367
                 if ( array_key_exists( $sFieldID, $aOptions ) ) {
368 368
                     return $aOptions[ $sFieldID ];
369 369
                 }
Please login to merge, or discard this patch.
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -180,24 +180,24 @@  discard block
 block discarded – undo
180 180
         }    
181 181
     
182 182
     /**
183
-    * Removes the given section(s) by section ID.
184
-    * 
185
-    * This accesses the property storing the added section arrays and removes the specified ones.
186
-    * 
187
-    * <h4>Example</h4>
188
-    * <code>$this->removeSettingSections( 'text_fields', 'selectors', 'another_section', 'yet_another_section' );
189
-    * </code>
190
-    * 
191
-    * @since        2.0.0
192
-    * @since        3.0.0       Changed the scope to public from protected.
193
-    * @since        3.5.3       Removed the parameter declarations as they are caught with the func_get_args().
194
-    * @access       public
195
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
196
-    * @param        string      $sSectionID1        the section ID to remove.
197
-    * @param        string      $sSectionID2        (optional) another section ID to remove.
198
-    * @param        string      $_and_more          (optional) add more section IDs to the next parameters as many as necessary.
199
-    * @return       void
200
-    */    
183
+     * Removes the given section(s) by section ID.
184
+     * 
185
+     * This accesses the property storing the added section arrays and removes the specified ones.
186
+     * 
187
+     * <h4>Example</h4>
188
+     * <code>$this->removeSettingSections( 'text_fields', 'selectors', 'another_section', 'yet_another_section' );
189
+     * </code>
190
+     * 
191
+     * @since        2.0.0
192
+     * @since        3.0.0       Changed the scope to public from protected.
193
+     * @since        3.5.3       Removed the parameter declarations as they are caught with the func_get_args().
194
+     * @access       public
195
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
196
+     * @param        string      $sSectionID1        the section ID to remove.
197
+     * @param        string      $sSectionID2        (optional) another section ID to remove.
198
+     * @param        string      $_and_more          (optional) add more section IDs to the next parameters as many as necessary.
199
+     * @return       void
200
+     */    
201 201
     public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {    
202 202
         foreach( func_get_args() as $_sSectionID ) {
203 203
             $this->oForm->removeSection( $_sSectionID );
@@ -262,38 +262,38 @@  discard block
 block discarded – undo
262 262
         }
263 263
     }
264 264
     /**
265
-    * Adds the given field array items into the field array property.
266
-    * 
267
-    * Identical to the `addSettingFields()` method except that this method does not accept enumerated parameters. 
268
-    * 
269
-    * @since        2.1.2
270
-    * @since        3.0.0           Changed the scope to public from protected.
271
-    * @access       public
272
-    * @param        array|string    $asField        the field array or the target section ID. If the target section ID is set, the section_id key can be omitted from the next passing field array.
273
-    * @return       void
274
-    */    
265
+     * Adds the given field array items into the field array property.
266
+     * 
267
+     * Identical to the `addSettingFields()` method except that this method does not accept enumerated parameters. 
268
+     * 
269
+     * @since        2.1.2
270
+     * @since        3.0.0           Changed the scope to public from protected.
271
+     * @access       public
272
+     * @param        array|string    $asField        the field array or the target section ID. If the target section ID is set, the section_id key can be omitted from the next passing field array.
273
+     * @return       void
274
+     */    
275 275
     public function addSettingField( $asField ) {
276 276
         $this->oForm->addField( $asField );    
277 277
     }    
278 278
     
279 279
     /**
280
-    * Removes the given field(s) by field ID.
281
-    * 
282
-    * This accesses the property storing the added field arrays and removes the specified ones.
283
-    * 
284
-    * <h4>Example</h4>
285
-    * <code>$this->removeSettingFields( 'fieldID_A', 'fieldID_B', 'fieldID_C', 'fieldID_D' );
286
-    * </code>
287
-    * 
288
-    * @since        2.0.0
289
-    * @since        3.0.0       Changed the scope to public from protected.
290
-    * @access       public
291
-    * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
292
-    * @param        string      $sFieldID1      the field ID to remove.
293
-    * @param        string      $sFieldID2      (optional) another field ID to remove.
294
-    * @param        string      $_and_more      (optional) add more field IDs to the next parameters as many as necessary.
295
-    * @return void
296
-    */    
280
+     * Removes the given field(s) by field ID.
281
+     * 
282
+     * This accesses the property storing the added field arrays and removes the specified ones.
283
+     * 
284
+     * <h4>Example</h4>
285
+     * <code>$this->removeSettingFields( 'fieldID_A', 'fieldID_B', 'fieldID_C', 'fieldID_D' );
286
+     * </code>
287
+     * 
288
+     * @since        2.0.0
289
+     * @since        3.0.0       Changed the scope to public from protected.
290
+     * @access       public
291
+     * @remark       Accepts variadic parameters; the number of accepted parameters are not limited to three.
292
+     * @param        string      $sFieldID1      the field ID to remove.
293
+     * @param        string      $sFieldID2      (optional) another field ID to remove.
294
+     * @param        string      $_and_more      (optional) add more field IDs to the next parameters as many as necessary.
295
+     * @return void
296
+     */    
297 297
     public function removeSettingFields( $sFieldID1, $sFieldID2=null, $_and_more ) {
298 298
         foreach( func_get_args() as $_sFieldID ) { 
299 299
             $this->oForm->removeField( $_sFieldID ); 
Please login to merge, or discard this patch.
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */     
85 85
     public function addSettingSections( /* $aSection1, $aSection2=null, $_and_more=null */ ) {
86 86
         
87
-        foreach( func_get_args() as $asSection ) { 
87
+        foreach( func_get_args() as $asSection ) {
88 88
             $this->addSettingSection( $asSection ); 
89 89
         }
90 90
         
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     * @param        string      $_and_more          (optional) add more section IDs to the next parameters as many as necessary.
199 199
     * @return       void
200 200
     */    
201
-    public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {    
201
+    public function removeSettingSections( /* $sSectionID1=null, $sSectionID2=null, $_and_more=null */ ) {
202 202
         foreach( func_get_args() as $_sSectionID ) {
203 203
             $this->oForm->removeSection( $_sSectionID );
204 204
         }        
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
      * @remark      Accepts variadic parameters; the number of accepted parameters are not limited to three.
257 257
      * @remark      The actual registration will be performed in the <em>_replyToRegisterSettings()</em> method with the <em>admin_menu</em> hook.
258 258
      */     
259
-    public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {    
260
-        foreach( func_get_args() as $aField ) { 
259
+    public function addSettingFields( /* $aField1, $aField2=null, $_and_more=null */ ) {
260
+        foreach( func_get_args() as $aField ) {
261 261
             $this->addSettingField( $aField ); 
262 262
         }
263 263
     }
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
     * @return void
296 296
     */    
297 297
     public function removeSettingFields( $sFieldID1, $sFieldID2=null, $_and_more ) {
298
-        foreach( func_get_args() as $_sFieldID ) { 
298
+        foreach( func_get_args() as $_sFieldID ) {
299 299
             $this->oForm->removeField( $_sFieldID ); 
300 300
         }
301 301
     }    
Please login to merge, or discard this patch.
development/factory/widget/AdminPageFramework_Widget_Factory.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -23,6 +23,7 @@
 block discarded – undo
23 23
      * Sets up internal properties.
24 24
      * 
25 25
      * @since       3.2.0
26
+     * @param AdminPageFramework_Widget_Model $oCaller
26 27
      * @return      void
27 28
      */
28 29
 	public function __construct( $oCaller, $sWidgetTitle, array $aArguments=array() ) {
Please login to merge, or discard this patch.
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @since       3.2.0
27 27
      * @return      void
28 28
      */
29
-	public function __construct( $oCaller, $sWidgetTitle, array $aArguments=array() ) {
29
+    public function __construct( $oCaller, $sWidgetTitle, array $aArguments=array() ) {
30 30
 		
31 31
         $aArguments = $aArguments 
32 32
             + array( 
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
                 'description'   => '',  
35 35
             );
36 36
             
37
-		parent::__construct( 
37
+        parent::__construct( 
38 38
             $oCaller->oProp->sClassName,  // base id 
39 39
             $sWidgetTitle,      // widget title
40 40
             $aArguments         // widget arguments
41 41
         );
42 42
         $this->oCaller = $oCaller;
43 43
      
44
-	}
44
+    }
45 45
     
46 46
     /**
47 47
      * Displays the widget contents in the front end.
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * whether the title should be visible or not depending on the content.
52 52
      * @return      void
53 53
      */
54
-	public function widget( $aArguments, $aFormData ) {
54
+    public function widget( $aArguments, $aFormData ) {
55 55
            
56 56
         echo $aArguments[ 'before_widget' ];
57 57
         
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
 
75 75
         echo $_sContent;
76 76
         
77
-		echo $aArguments[ 'after_widget' ];
77
+        echo $aArguments[ 'after_widget' ];
78 78
 		
79
-	}
79
+    }
80 80
         /**
81 81
          * Returns the widget title.
82 82
          * 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             if ( ! $_sTitle ) {
106 106
                 return '';
107 107
             }
108
-           return $aArguments['before_title'] 
108
+            return $aArguments['before_title'] 
109 109
                 . $_sTitle 
110 110
             . $aArguments['after_title'];           
111 111
             
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      * @since       3.2.0
118 118
      * @return      mixed       The validated form data. The type should be an array but it is dealt by the framework user it will be unknown.
119 119
      */
120
-	public function update( $aSubmittedFormData, $aSavedFormData ) {
120
+    public function update( $aSubmittedFormData, $aSavedFormData ) {
121 121
                 
122 122
         return $this->oCaller->oUtil->addAndApplyFilters(
123 123
             $this->oCaller, 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             $this->oCaller
131 131
         );
132 132
  
133
-	}
133
+    }
134 134
     
135 135
     /**
136 136
      * Constructs the widget form with the given saved form data.
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      * 
142 142
      * @return      void
143 143
      */
144
-	public function form( $aSavedFormData ) {
144
+    public function form( $aSavedFormData ) {
145 145
         
146 146
         $this->oCaller->oForm->aCallbacks = $this->_getFormCallbacks() + $this->oCaller->oForm->aCallbacks;
147 147
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $this->oCaller->oForm->aSectionsets          = $_aSectionsets;
181 181
         $this->oCaller->oForm->aFieldsets            = $_aFieldsets;
182 182
         
183
-	}
183
+    }
184 184
         /**
185 185
          * Calls the load() method of the caller factory object.
186 186
          * 
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @since       3.2.0
27 27
      * @return      void
28 28
      */
29
-	public function __construct( $oCaller, $sWidgetTitle, array $aArguments=array() ) {
29
+	public function __construct( $oCaller, $sWidgetTitle, array $aArguments = array() ) {
30 30
 		
31 31
         $aArguments = $aArguments 
32 32
             + array( 
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
             );
36 36
             
37 37
 		parent::__construct( 
38
-            $oCaller->oProp->sClassName,  // base id 
39
-            $sWidgetTitle,      // widget title
38
+            $oCaller->oProp->sClassName, // base id 
39
+            $sWidgetTitle, // widget title
40 40
             $aArguments         // widget arguments
41 41
         );
42 42
         $this->oCaller = $oCaller;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         
58 58
         $this->oCaller->oUtil->addAndDoActions( 
59 59
             $this->oCaller, 
60
-            'do_' . $this->oCaller->oProp->sClassName, 
60
+            'do_'.$this->oCaller->oProp->sClassName, 
61 61
             $this->oCaller
62 62
         );
63 63
        
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
          */
89 89
         private function _getTitle( array $aArguments, array $aFormData ) {
90 90
                 
91
-            if ( ! $this->oCaller->oProp->bShowWidgetTitle ) {
91
+            if ( !$this->oCaller->oProp->bShowWidgetTitle ) {
92 92
                 return '';
93 93
             }
94 94
             
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
                 $aFormData,
103 103
                 $this->id_base 
104 104
             );
105
-            if ( ! $_sTitle ) {
105
+            if ( !$_sTitle ) {
106 106
                 return '';
107 107
             }
108
-           return $aArguments['before_title'] 
108
+           return $aArguments[ 'before_title' ] 
109 109
                 . $_sTitle 
110
-            . $aArguments['after_title'];           
110
+            . $aArguments[ 'after_title' ];           
111 111
             
112 112
         }
113 113
             
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             $this->oCaller, 
124 124
             "validation_{$this->oCaller->oProp->sClassName}", 
125 125
             call_user_func_array( 
126
-                array( $this->oCaller, 'validate' ),    // triggers __call()
126
+                array( $this->oCaller, 'validate' ), // triggers __call()
127 127
                 array( $aSubmittedFormData, $aSavedFormData, $this->oCaller ) // parameters
128 128
             ), // 3.5.3+                        
129 129
             $aSavedFormData,
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
         $this->oCaller->oForm   = new AdminPageFramework_Form_widget(
172 172
             array(
173 173
                 'register_if_action_already_done' => false, // do not register fields right away
174
-            ) + $this->oCaller->oProp->aFormArguments,  // form arguments  
175
-            $this->oCaller->oForm->aCallbacks,  // callbacks 
174
+            ) + $this->oCaller->oProp->aFormArguments, // form arguments  
175
+            $this->oCaller->oForm->aCallbacks, // callbacks 
176 176
             $this->oCaller->oMsg
177 177
         );
178 178
         // Reuse the data of the previous widget instance.
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
              * Call the load method only once per class. Also the added field registrations in the class also done once.
194 194
              * @since       3.7.9
195 195
              */ 
196
-            if ( $this->oCaller->oUtil->hasBeenCalled( '_widget_load_' . $this->oCaller->oProp->sClassName ) ) {
196
+            if ( $this->oCaller->oUtil->hasBeenCalled( '_widget_load_'.$this->oCaller->oProp->sClassName ) ) {
197 197
 
198 198
                 /**
199 199
                  * The saved option callback is done with the below load_... callback so for widget form instances called from the second time
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             $this->oCaller->oUtil->addAndDoActions( 
212 212
                 $this->oCaller, 
213 213
                 array(
214
-                    'load_' . $this->oCaller->oProp->sClassName, 
214
+                    'load_'.$this->oCaller->oProp->sClassName, 
215 215
                 ),
216 216
                 $this->oCaller 
217 217
             );            
@@ -225,9 +225,9 @@  discard block
 block discarded – undo
225 225
          */
226 226
         private function _getFormCallbacks() {
227 227
             return array( 
228
-                'hfID'          => array( $this, 'get_field_id' ),    // defined in the WP_Widget class.  
229
-                'hfTagID'       => array( $this, 'get_field_id' ),    // defined in the WP_Widget class.  
230
-                'hfName'        => array( $this, '_replyToGetFieldName' ),  // defined in the WP_Widget class.  
228
+                'hfID'          => array( $this, 'get_field_id' ), // defined in the WP_Widget class.  
229
+                'hfTagID'       => array( $this, 'get_field_id' ), // defined in the WP_Widget class.  
230
+                'hfName'        => array( $this, '_replyToGetFieldName' ), // defined in the WP_Widget class.  
231 231
                 'hfInputName'   => array( $this, '_replyToGetFieldInputName' ),
232 232
                 
233 233
                 'saved_data'    => array( $this, '_replyToGetSavedFormData' ),
@@ -243,8 +243,8 @@  discard block
 block discarded – undo
243 243
     public function  _replyToGetSavedFormData() {
244 244
         return $this->oCaller->oUtil->addAndApplyFilter(
245 245
             $this->oCaller, // the caller factory object
246
-            'options_' . $this->oCaller->oProp->sClassName,
247
-            $this->oCaller->oProp->aOptions,      // subject value to be filtered
246
+            'options_'.$this->oCaller->oProp->sClassName,
247
+            $this->oCaller->oProp->aOptions, // subject value to be filtered
248 248
             $this->id   // 3.7.9+
249 249
         );        
250 250
     }    
@@ -277,9 +277,9 @@  discard block
 block discarded – undo
277 277
                 ? "[{$aFieldset[ '_section_index' ]}]" 
278 278
                 : "";             
279 279
             $_sDimensions   = $this->oCaller->isSectionSet( $aFieldset )
280
-                ? $aFieldset[ 'section_id' ] . "]" . $_sSectionIndex . "[" . $aFieldset[ 'field_id' ]
280
+                ? $aFieldset[ 'section_id' ]."]".$_sSectionIndex."[".$aFieldset[ 'field_id' ]
281 281
                 : $aFieldset[ 'field_id' ];                
282
-            return 'widget-' . $this->id_base . '[' . $this->number . '][' . $_sDimensions . ']';
282
+            return 'widget-'.$this->id_base.'['.$this->number.']['.$_sDimensions.']';
283 283
         }        
284 284
     
285 285
     /**
@@ -296,9 +296,9 @@  discard block
 block discarded – undo
296 296
         $_sIndex        = $this->oCaller->oUtil->getAOrB(
297 297
             '0' !== $sIndex && empty( $sIndex ),
298 298
             '',
299
-            "[" . $sIndex . "]"
299
+            "[".$sIndex."]"
300 300
         );                   
301
-        return $this->_replyToGetFieldName( '', $aFieldset ) . $_sIndex;
301
+        return $this->_replyToGetFieldName( '', $aFieldset ).$_sIndex;
302 302
 
303 303
     }
304 304
   
Please login to merge, or discard this patch.
class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_ReadMeBase.php 4 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -20,6 +20,8 @@
 block discarded – undo
20 20
     /**
21 21
      * 
22 22
      * @since       3.5.3
23
+     * @param string $sFilePath
24
+     * @param string $sTOCTitle
23 25
      */
24 26
     protected function _getReadmeContents( $sFilePath, $sTOCTitle, $asSections=array() ) {
25 27
         
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
             return $_oTOC->get();        
47 47
         }
48 48
         return ''
49
-         . $_sContent;
49
+            . $_sContent;
50 50
         
51 51
     }
52 52
     
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      * 
22 22
      * @since       3.5.3
23 23
      */
24
-    protected function _getReadmeContents( $sFilePath, $sTOCTitle, $asSections=array() ) {
24
+    protected function _getReadmeContents( $sFilePath, $sTOCTitle, $asSections = array() ) {
25 25
         
26 26
         $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( 
27 27
             $sFilePath, 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             )
35 35
         );    
36 36
         $_sContent = '';
37
-        foreach( ( array ) $asSections as $_sSection  ) {
37
+        foreach ( ( array ) $asSections as $_sSection ) {
38 38
             $_sContent .= $_oWPReadmeParser->getSection( $_sSection );  
39 39
         }        
40 40
         if ( $sTOCTitle ) {            
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
              * @since       3.6.1
67 67
              * @return      string      The generate HTML output.
68 68
              */
69
-            public function _replyToProcessShortcode_embed( $aAttributes, $sURL, $sShortcode='' ) {
69
+            public function _replyToProcessShortcode_embed( $aAttributes, $sURL, $sShortcode = '' ) {
70 70
 
71 71
                 $sURL   = isset( $aAttributes[ 'src' ] ) ? $aAttributes[ 'src' ] : $sURL;      
72 72
                 $_sHTML = wp_oembed_get( $sURL );
@@ -108,27 +108,27 @@  discard block
 block discarded – undo
108 108
      *  array( 'Second Heading' => 'Another text', ),
109 109
      * )
110 110
      */
111
-    public function getContentsByHeader( $sContents, $iHeaderNumber=2 ) {
111
+    public function getContentsByHeader( $sContents, $iHeaderNumber = 2 ) {
112 112
     
113 113
         $_aContents = array();
114 114
         $_aSplitContents = preg_split( 
115 115
             // '/^[\s]*==[\s]*(.+?)[\s]*==/m', 
116
-            '/(<h[' . $iHeaderNumber . ']*[^>]*>.*?<\/h[' . $iHeaderNumber . ']>)/i',
116
+            '/(<h['.$iHeaderNumber.']*[^>]*>.*?<\/h['.$iHeaderNumber.']>)/i',
117 117
             $sContents,
118 118
             -1, 
119
-            PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY 
119
+            PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY 
120 120
         );                   
121 121
 
122
-        foreach( $_aSplitContents as $_iIndex => $_sSplitContent ) {
123
-            if ( ! preg_match( '/<h[' . $iHeaderNumber . ']*[^>]*>(.*?)<\/h[' . $iHeaderNumber . ']>/i', $_sSplitContent , $_aMatches ) ) {
122
+        foreach ( $_aSplitContents as $_iIndex => $_sSplitContent ) {
123
+            if ( !preg_match( '/<h['.$iHeaderNumber.']*[^>]*>(.*?)<\/h['.$iHeaderNumber.']>/i', $_sSplitContent, $_aMatches ) ) {
124 124
                 continue;
125 125
             }
126 126
         
127
-            if ( ! isset( $_aMatches[ 1 ] ) ) {
127
+            if ( !isset( $_aMatches[ 1 ] ) ) {
128 128
                 continue;
129 129
             }
130
-            if ( isset( $_aSplitContents[ $_iIndex + 1 ] ) )  {
131
-                $_aContents[] = array( 
130
+            if ( isset( $_aSplitContents[ $_iIndex + 1 ] ) ) {
131
+                $_aContents[ ] = array( 
132 132
                     $_aMatches[ 1 ],
133 133
                     $_aSplitContents[ $_iIndex + 1 ]
134 134
                 );
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         foreach( ( array ) $asSections as $_sSection  ) {
38 38
             $_sContent .= $_oWPReadmeParser->getSection( $_sSection );  
39 39
         }        
40
-        if ( $sTOCTitle ) {            
40
+        if ( $sTOCTitle ) {
41 41
             $_oTOC = new AdminPageFramework_TableOfContents(
42 42
                 $_sContent,
43 43
                 4,
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             if ( ! isset( $_aMatches[ 1 ] ) ) {
128 128
                 continue;
129 129
             }
130
-            if ( isset( $_aSplitContents[ $_iIndex + 1 ] ) )  {
130
+            if ( isset( $_aSplitContents[ $_iIndex + 1 ] ) ) {
131 131
                 $_aContents[] = array( 
132 132
                     $_aMatches[ 1 ],
133 133
                     $_aSplitContents[ $_iIndex + 1 ]
Please login to merge, or discard this patch.
generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator.php 3 patches
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -257,6 +257,7 @@  discard block
 block discarded – undo
257 257
          * Generates the framework zip data.
258 258
          * 
259 259
          * @since       3.5.4
260
+         * @param string $sFrameworkDirPath
260 261
          * @return      string      The binary zip data.
261 262
          */
262 263
         private function _getDownloadFrameworkZipFile( $sFrameworkDirPath, $sDestinationPath ) {
@@ -308,11 +309,7 @@  discard block
 block discarded – undo
308 309
                  * 
309 310
                  * @since       3.5.4
310 311
                  * @remark      string      $sPath              The path to check. It can be a directory or a file.
311
-                 * @param       string      $sPathInArchive     The parsing directory path set to the archive. 
312
-                 * The passed path for the archive has a trailing slash. It starts with a directory name.
313
-                 * e.g.
314
-                 * `utility/AdminPageFramework_WPReadmeParser/`
315
-                 * `factory/widget/model/`
312
+                 * @param string $sPath
316 313
                  * @return      boolean
317 314
                  */
318 315
                 private function _isAllowedArchivePath( $sPath ) {
@@ -567,6 +564,7 @@  discard block
 block discarded – undo
567 564
                  * Modifies the text domain in the given file contents.
568 565
                  * 
569 566
                  * @since       3.5.4
567
+                 * @param string $sFileContents
570 568
                  * @return      string
571 569
                  */                
572 570
                 private function _modifyTextDomain( $sFileContents ) {
@@ -585,6 +583,7 @@  discard block
 block discarded – undo
585 583
                      * Retrieves the value from the $_POST array by the given field ID.
586 584
                      * 
587 585
                      * @since       3.5.4
586
+                     * @param string $sFieldID
588 587
                      * @return      string
589 588
                      */
590 589
                     private function _getFormSubmitValueByFieldIDAsString( $sFieldID ) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -637,7 +637,7 @@
 block discarded – undo
637 637
      * @callback    filter    "export_name_{page slug}_{tab slug}" filter.
638 638
      * @return      string
639 639
      */
640
-    public function replyToFilterFileName( $sFileName, $sFieldID, $sInputID, $vExportingData, $oAdminPage ) { 
640
+    public function replyToFilterFileName( $sFileName, $sFieldID, $sInputID, $vExportingData, $oAdminPage ) {
641 641
         return $this->_getDownloadFileName();
642 642
     }        
643 643
     
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $this->oFactory = $oFactory;
31 31
         
32 32
         add_action( 
33
-            'export_name_' . $this->sPageSlug . '_' . $this->sTabSlug, 
33
+            'export_name_'.$this->sPageSlug.'_'.$this->sTabSlug, 
34 34
             array( $this, 'replyToFilterFileName' ), 
35 35
             10, 
36 36
             5 
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
                 'label_min_width'   => 0,
128 128
                 'order'             => 100,
129 129
                 'value'             => __( 'Download', 'adimn-page-framework-demo' ),
130
-                'file_name'         => 'admin-page-framework.zip',  // the default file name. This will be modified by the filter.
131
-                'format'            => 'text',  // 'json', 'text', 'array'      
130
+                'file_name'         => 'admin-page-framework.zip', // the default file name. This will be modified by the filter.
131
+                'format'            => 'text', // 'json', 'text', 'array'      
132 132
                 'description'       => $oFactory->oUtil->getAOrB(
133 133
                     class_exists( 'ZipArchive' ),
134 134
                     __( 'Download the compiled framework files as a zip file.', 'admin-page-framework-loader' ),
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
         
183 183
         // the class prefix must not contain white spaces and some other characters not supported in PHP class names.
184 184
         preg_match( 
185
-            '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/',     // pattern - allowed characters for variables in PHP.
186
-            $aInput[ 'class_prefix' ],     // subject
185
+            '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', // pattern - allowed characters for variables in PHP.
186
+            $aInput[ 'class_prefix' ], // subject
187 187
             $_aMatches 
188 188
         );
189 189
         if ( $aInput[ 'class_prefix' ] && empty( $_aMatches ) ) {
@@ -191,13 +191,13 @@  discard block
 block discarded – undo
191 191
             $_bVerified = false;
192 192
         }
193 193
                         
194
-        if ( ! $aInput[ 'text_domain' ] ) {
194
+        if ( !$aInput[ 'text_domain' ] ) {
195 195
             $_aErrors[ $this->sSectionID ][ 'text_domain' ] = __( 'The text domain cannot be empty.', 'admin-page-framework-loader' );
196 196
             $_bVerified = false;
197 197
         }
198 198
                 
199 199
         // An invalid value is found. Set a field error array and an admin notice and return the old values.
200
-        if ( ! $_bVerified ) {
200
+        if ( !$_bVerified ) {
201 201
             $oAdminPage->setFieldErrors( $_aErrors );     
202 202
             $oAdminPage->setSettingNotice( __( 'There was something wrong with your input.', 'admin-page-framework-loader' ) );
203 203
             return $aOldInput;
@@ -239,8 +239,8 @@  discard block
 block discarded – undo
239 239
      */
240 240
     public function replyToDownloadFramework( $aSavedData, $sSubmittedFieldID, $sSubmittedInputID, $oAdminPage ) {
241 241
         
242
-        $_sFrameworkDirPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/library/apf';
243
-        if ( ! file_exists( $_sFrameworkDirPath ) ) {
242
+        $_sFrameworkDirPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/library/apf';
243
+        if ( !file_exists( $_sFrameworkDirPath ) ) {
244 244
             return $aSavedData;
245 245
         }
246 246
         
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
             $_sFrameworkDirPath, 
250 250
             $_sTempFile
251 251
         );
252
-        header( "Content-Length: " . strlen( $_sData ) ); 
252
+        header( "Content-Length: ".strlen( $_sData ) ); 
253 253
         unlink( $_sTempFile );
254 254
         return $_sData;
255 255
         
@@ -266,9 +266,9 @@  discard block
 block discarded – undo
266 266
                 $sFrameworkDirPath, 
267 267
                 $sDestinationPath, 
268 268
                 array(
269
-                    'include_directory'             => false,   // wrap contents in a sub-directory
269
+                    'include_directory'             => false, // wrap contents in a sub-directory
270 270
                     'additional_source_directories' => apply_filters(
271
-                        AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_additional_source_directories',
271
+                        AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_additional_source_directories',
272 272
                         array() // directory paths 
273 273
                     ),
274 274
                 ),                
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
                 ) 
280 280
             );
281 281
             $_bSucceed = $_oZip->compress();
282
-            if ( ! $_bSucceed ) {
282
+            if ( !$_bSucceed ) {
283 283
                 return '';
284 284
             }
285 285
             return file_get_contents( $sDestinationPath );
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 
300 300
                 // Check if it belongs to selected components.
301 301
                 if ( false === $this->_isAllowedArchivePath( $sPathInArchive ) ) {
302
-                    return '';  // empty value will drop the entry
302
+                    return ''; // empty value will drop the entry
303 303
                 }                
304 304
                 return $sPathInArchive;
305 305
                            
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
                  */
319 319
                 private function _isAllowedArchivePath( $sPath ) {
320 320
                     
321
-                    foreach( $this->_getDisallowedArchiveDirectoryPaths() as $_sDisallowedPath ) {
321
+                    foreach ( $this->_getDisallowedArchiveDirectoryPaths() as $_sDisallowedPath ) {
322 322
                         $_bHasPrefix = $this->oFactory->oUtil->hasPrefix( 
323 323
                             ltrim( $_sDisallowedPath, '/' ), // needle
324 324
                             ltrim( $sPath, '/' ) // haystack
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
                     // List paths.
388 388
                     $_aAllComponentsPaths       = array();
389 389
                     $_aSelectedComponentsPaths  = array();
390
-                    foreach( $this->_aComponentPaths as $_sKey => $_aPaths ) {
390
+                    foreach ( $this->_aComponentPaths as $_sKey => $_aPaths ) {
391 391
                     
392 392
                         // Extract all component paths.
393 393
                         $_aAllComponentsPaths = array_merge(
@@ -442,16 +442,16 @@  discard block
 block discarded – undo
442 442
 
443 443
                 // Check the file extension.
444 444
                 $_aAllowedExtensions = apply_filters(
445
-                    AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_allowed_file_extensions',
445
+                    AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_allowed_file_extensions',
446 446
                     array( 'php', 'css', 'js' )
447 447
                 );
448
-                if ( ! in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions ) ) {
448
+                if ( !in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions ) ) {
449 449
                     return $sFileContents;
450 450
                 }            
451 451
                 
452 452
                 // Modify the file contents.
453 453
                 $sFileContents = apply_filters(
454
-                    AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_file_contents',
454
+                    AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_file_contents',
455 455
                     $sFileContents, 
456 456
                     $sPathInArchive,
457 457
                     $this->oFactory->oUtil->getElement(
@@ -512,12 +512,12 @@  discard block
 block discarded – undo
512 512
                             $this->_getCheckedComponents()
513 513
                         );
514 514
                         $_aInsert = array(
515
-                            'Included Components: ' . implode( ', ', $_aCheckedComponents ),
516
-                            'Generated on ' . date( 'Y-m-d' ),  // today's date
515
+                            'Included Components: '.implode( ', ', $_aCheckedComponents ),
516
+                            'Generated on '.date( 'Y-m-d' ), // today's date
517 517
                         );
518 518
                         return preg_replace(
519 519
                             '#\*/#', // needle - matches '*/'
520
-                            implode( PHP_EOL . ' ', $_aInsert ) . ' \0', // replacement \0 is a back-reference to '*/'
520
+                            implode( PHP_EOL.' ', $_aInsert ).' \0', // replacement \0 is a back-reference to '*/'
521 521
                             $sFileContents, // subject
522 522
                             1 // replace only the first occurrence
523 523
                         );      
@@ -531,14 +531,14 @@  discard block
 block discarded – undo
531 531
                     private function _modifyClassNameOfInclusionList( $sFileContents ) {
532 532
                         // Replace the array key names.
533 533
                         $sFileContents = preg_replace_callback(
534
-                            '/(["\'])(.+)\1(?=\s?+=>)/',  // pattern '
535
-                            array( $this, '_replyToModifyPathName' ),   // callable
534
+                            '/(["\'])(.+)\1(?=\s?+=>)/', // pattern '
535
+                            array( $this, '_replyToModifyPathName' ), // callable
536 536
                             $sFileContents // subject
537 537
                         );     
538 538
                         // Replace the registry class names.
539 539
                         return preg_replace_callback(
540
-                            '/(=>\s?+)(.+)(?=::)/',  // pattern '
541
-                            array( $this, '_replyToModifyPathName' ),   // callable
540
+                            '/(=>\s?+)(.+)(?=::)/', // pattern '
541
+                            array( $this, '_replyToModifyPathName' ), // callable
542 542
                             $sFileContents // subject
543 543
                         );     
544 544
                     }
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
                     return strlen( $_sPrefix )
564 564
                         ? str_replace( 
565 565
                             'AdminPageFramework', // search 
566
-                            $_sPrefix . 'AdminPageFramework', // replace
566
+                            $_sPrefix.'AdminPageFramework', // replace
567 567
                             $sSubject // subject
568 568
                         )
569 569
                         : $sSubject;
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
                      */
596 596
                     private function _getFormSubmitValueByFieldIDAsString( $sFieldID ) {
597 597
                          
598
-                        static $_aCaches=array();
598
+                        static $_aCaches = array();
599 599
                         $_aCaches[ $sFieldID ] = isset( $_aCaches[ $sFieldID ] )
600 600
                             ? $_aCaches[ $sFieldID ]
601 601
                             : $this->oFactory->oUtil->getElement(
@@ -629,9 +629,9 @@  discard block
 block discarded – undo
629 629
                 'public',
630 630
             ),
631 631
             'Content-Description'       => 'File Transfer',
632
-            'Content-type'              => 'application/octet-stream',   // 'application/zip' may work as well
632
+            'Content-type'              => 'application/octet-stream', // 'application/zip' may work as well
633 633
             'Content-Transfer-Encoding' => 'binary',
634
-            'Content-Disposition'       => 'attachment; filename="' . $sFileName .'";',
634
+            'Content-Disposition'       => 'attachment; filename="'.$sFileName.'";',
635 635
             // 'Content-Length'            => strlen( $mData ),
636 636
         ) + $aHeader;
637 637
         
@@ -668,10 +668,10 @@  discard block
 block discarded – undo
668 668
         $_sFileNameWOExtension = trim( $_sFileNameWOExtension );
669 669
         return $this->oFactory->oUtil->getAOrB(
670 670
                 $_sFileNameWOExtension,
671
-                $_sFileNameWOExtension . '-admin-page-framework',
671
+                $_sFileNameWOExtension.'-admin-page-framework',
672 672
                 'admin-page-framework'
673 673
             )
674
-            . '.' . AdminPageFramework_Registry::VERSION
674
+            . '.'.AdminPageFramework_Registry::VERSION
675 675
             . '.zip';
676 676
         
677 677
     }
Please login to merge, or discard this patch.
tool/minifier/AdminPageFrameworkLoader_AdminPage_Tool_Minifier_Minifier.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -139,6 +139,7 @@
 block discarded – undo
139 139
          * Modifies the class names of the minified script.
140 140
          * 
141 141
          * @since       3.4.6
142
+         * @param string $sCode
142 143
          */
143 144
         private function _modifyClassNames( $sCode ) {
144 145
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             4 
27 27
         );
28 28
         add_action( 
29
-            'export_name_' . $this->sPageSlug . '_' . $this->sTabSlug, 
29
+            'export_name_'.$this->sPageSlug.'_'.$this->sTabSlug, 
30 30
             array( $this, 'replyToFilterFileName' ), 10, 5 
31 31
         );
32 32
         
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
                 'title'             => __( 'Class Prefix', 'admin-page-framework-loader' ),
42 42
                 'type'              => 'text',
43 43
                 'description'       => __( 'Set alphanumeric characters for the class names', 'admin-page-framework-loader' )
44
-                    . ' ' .  __( 'For example, if you set here <code>MyPluginName_</code>, you will need to extend the class named <code>MyClassName_AdminPageFramework</code> instead of <code>AdminPageFramework</code>.', 'admin-page-framework-loader' )
44
+                    . ' '.__( 'For example, if you set here <code>MyPluginName_</code>, you will need to extend the class named <code>MyClassName_AdminPageFramework</code> instead of <code>AdminPageFramework</code>.', 'admin-page-framework-loader' )
45 45
                     . ' e.g.<code>MyPluginName_</code>',
46 46
                 'attributes'        => array(
47 47
                     'size'          => 30,
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
                 'type'              => 'export',
69 69
                 'label_min_width'   => 0,
70 70
                 'value'             => __( 'Download', 'adimn-page-framework-demo' ),
71
-                'file_name'         => 'admin-page-framework.min.php',  // the default file name. This will be modified by the filter.
72
-                'format'            => 'text',  // 'json', 'text', 'array'      
71
+                'file_name'         => 'admin-page-framework.min.php', // the default file name. This will be modified by the filter.
72
+                'format'            => 'text', // 'json', 'text', 'array'      
73 73
                 'description'       => __( 'Download the minified version.', 'admin-page-framework-loader' ),
74 74
             ) 
75 75
         );          
@@ -101,13 +101,13 @@  discard block
 block discarded – undo
101 101
         if ( $aInput[ 'class_prefix' ] && empty( $_aMatches ) ) {
102 102
       
103 103
             // $variable[ 'sectioni_id' ]['field_id']
104
-            $_aErrors['class_prefix'] = __( 'The prefix must consist of alphanumeric with underscores.', 'admin-page-framework-loader' );
104
+            $_aErrors[ 'class_prefix' ] = __( 'The prefix must consist of alphanumeric with underscores.', 'admin-page-framework-loader' );
105 105
             $_bVerified = false;
106 106
                     
107 107
         }
108 108
 
109 109
         /* 4. An invalid value is found. */
110
-        if ( ! $_bVerified ) {
110
+        if ( !$_bVerified ) {
111 111
 
112 112
             /* 4-1. Set the error array for the input fields. */
113 113
             $oAdminPage->setFieldErrors( $_aErrors );     
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function replyToDownloadMinifiedVersion( $aSavedData, $sSubmittedFieldID, $sSubmittedInputID, $oAdminPage ) {
130 130
         
131
-        $_sMinifiedVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/library/admin-page-framework.min.php';
131
+        $_sMinifiedVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/library/admin-page-framework.min.php';
132 132
         if ( file_exists( $_sMinifiedVersionPath ) ) {
133 133
             return $this->_modifyClassNames( file_get_contents( $_sMinifiedVersionPath ) );
134 134
         }
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
                 : '';             
148 148
             
149 149
             return str_replace( 
150
-                'AdminPageFramework',         // search 
151
-                $_sPrefix . 'AdminPageFramework',         // replace
150
+                'AdminPageFramework', // search 
151
+                $_sPrefix.'AdminPageFramework', // replace
152 152
                 $sCode // subject
153 153
             );
154 154
         
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
      * )      
169 169
      * </code>
170 170
      */
171
-    public function replyToFilterFileName( $sFileName, $sFieldID, $sInputID, $vExportingData, $oAdminPage ) { 
171
+    public function replyToFilterFileName( $sFileName, $sFieldID, $sInputID, $vExportingData, $oAdminPage ) {
172 172
 
173 173
         return isset( 
174 174
                 $_POST[ $this->oFactory->oProp->sOptionKey ][ $this->sSectionID ][ 'minified_script_name' ] 
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      * @param       string                  $sCapability    (optional) sets the overall access level to the admin pages created by the framework. The used capabilities are listed <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. The capability can be set per page, tab, setting section, setting field. Default: `manage_options`
57 57
      * @param       string                  $sTextDomain    (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: admin-page-framework.
58 58
      */
59
-    public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ){
59
+    public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ) {
60 60
                         
61 61
         if ( ! $this->_isInstantiatable() ) {
62 62
             return;
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @since       2.0.0
47 47
      * @see         http://codex.wordpress.org/Roles_and_Capabilities
48 48
      * @see         http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains
49
-     * @param       array|integer|string    $aisOptionKey    (optional) specifies the option key name to store in the options table. If this is not set, the instantiated class name will be used as default. 
49
+     * @param       array|integer|string    $isOptionKey    (optional) specifies the option key name to store in the options table. If this is not set, the instantiated class name will be used as default. 
50 50
      * [3.5.9+] If an integer is given, a transient will be used. If an array of option key arguments is given, the argument values will be set to the framework properties.
51 51
      * - type - either `options_table` or `transient`.
52 52
      * - key - the option key or the transient key
@@ -85,6 +85,7 @@  discard block
 block discarded – undo
85 85
         /**
86 86
          * Returns the script caller path.
87 87
          * @remark      It is important to find the caller script path here when separating the library into multiple files.
88
+         * @param string|null $sCallerPath
88 89
          * @return      null|string
89 90
          * @since       3.8.2
90 91
          */
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
      * @param       string                  $sCapability    (optional) sets the overall access level to the admin pages created by the framework. The used capabilities are listed <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. The capability can be set per page, tab, setting section, setting field. Default: `manage_options`
69 69
      * @param       string                  $sTextDomain    (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: admin-page-framework.
70 70
      */
71
-    public function __construct( $isOptionKey=null, $sCallerPath=null, $sCapability='manage_options', $sTextDomain='admin-page-framework' ){
71
+    public function __construct( $isOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework' ) {
72 72
 
73
-        if ( ! $this->_isInstantiatable() ) {
73
+        if ( !$this->_isInstantiatable() ) {
74 74
             return;
75 75
         }
76 76
                         
@@ -90,19 +90,19 @@  discard block
 block discarded – undo
90 90
          */
91 91
         private function _getCallerPath( $sCallerPath ) {
92 92
             
93
-            if ( $sCallerPath  ) {
93
+            if ( $sCallerPath ) {
94 94
                 return trim( $sCallerPath );
95 95
             }
96 96
             
97
-            if ( ! is_admin() ) {
97
+            if ( !is_admin() ) {
98 98
                 return null;
99 99
             }
100 100
             
101
-            if ( ! isset( $GLOBALS[ 'pagenow' ] ) ) {
101
+            if ( !isset( $GLOBALS[ 'pagenow' ] ) ) {
102 102
                 return null;
103 103
             }
104 104
             
105
-            $_sCalllerPath = in_array( $GLOBALS[ 'pagenow' ], array( 'plugins.php', ) ) || isset( $_GET[ 'page' ] )
105
+            $_sCalllerPath = in_array( $GLOBALS[ 'pagenow' ], array( 'plugins.php',) ) || isset( $_GET[ 'page' ] )
106 106
                 ? AdminPageFramework_Utility::getCallerScriptPath( __FILE__ ) // not using $oUtil as this method is caller earlier than the base constructor.
107 107
                 : null;
108 108
                 
Please login to merge, or discard this patch.
development/factory/admin_page/AdminPageFramework_Controller_Page.php 3 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @return      void
94 94
      */             
95 95
     public function addInPageTabs( /* $aTab1, $aTab2=null, $_and_more=null */ ) {
96
-        foreach( func_get_args() as $asTab ) { 
96
+        foreach ( func_get_args() as $asTab ) { 
97 97
             $this->addInPageTab( $asTab ); 
98 98
         }
99 99
     }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         
116 116
         // Target page slug - will be applied when no page slug is specified.
117 117
         static $__sTargetPageSlug; 
118
-        if ( ! is_array( $asInPageTab ) ) {
118
+        if ( !is_array( $asInPageTab ) ) {
119 119
             $__sTargetPageSlug = is_string( $asInPageTab ) 
120 120
                 ? $asInPageTab 
121 121
                 : $__sTargetPageSlug; // set the target page slug
@@ -130,23 +130,23 @@  discard block
 block discarded – undo
130 130
         );
131 131
         
132 132
         // Set the target page slug for next calls
133
-        $__sTargetPageSlug  = $aInPageTab[ 'page_slug' ]; 
133
+        $__sTargetPageSlug = $aInPageTab[ 'page_slug' ]; 
134 134
 
135 135
         // Required keys
136
-        if ( ! isset( $aInPageTab[ 'page_slug' ], $aInPageTab[ 'tab_slug' ] ) ) { 
136
+        if ( !isset( $aInPageTab[ 'page_slug' ], $aInPageTab[ 'tab_slug' ] ) ) { 
137 137
             return; 
138 138
         }
139 139
         
140 140
         // Count - the number of added in-page tabs.
141
-        $_aElements         = $this->oUtil->getElement(
141
+        $_aElements = $this->oUtil->getElement(
142 142
             $this->oProp->aInPageTabs,
143 143
             $aInPageTab[ 'page_slug' ],
144 144
             array()
145 145
         );
146
-        $_iCountElement      = count( $_aElements );
146
+        $_iCountElement = count( $_aElements );
147 147
 
148 148
         // Pre-format
149
-        $aInPageTab         = array( 
149
+        $aInPageTab = array( 
150 150
             'page_slug' => $this->oUtil->sanitizeSlug( $aInPageTab[ 'page_slug' ] ),
151 151
             'tab_slug'  => $this->oUtil->sanitizeSlug( $aInPageTab[ 'tab_slug' ] ),
152 152
             'order'     => $this->oUtil->getAOrB(
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      * @param       boolean     $bShow If false, the page title will not be displayed.
175 175
      * @return      void
176 176
      */ 
177
-    public function setPageTitleVisibility( $bShow=true, $sPageSlug='' ) {
177
+    public function setPageTitleVisibility( $bShow = true, $sPageSlug = '' ) {
178 178
         $this->_setPageProperty( 
179 179
             'bShowPageTitle', 
180 180
             'show_page_title', 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      * @remark      Page-heading tabs and in-page tabs are different. The former displays page titles and the latter displays tab titles.
199 199
      * @remark      If the second parameter is omitted, it sets the default value.
200 200
      */ 
201
-    public function setPageHeadingTabsVisibility( $bShow=true, $sPageSlug='' ) {
201
+    public function setPageHeadingTabsVisibility( $bShow = true, $sPageSlug = '' ) {
202 202
         $this->_setPageProperty( 
203 203
             'bShowPageHeadingTabs', 
204 204
             'show_page_heading_tabs', 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      * @param       string      $sPageSlug  The page to apply the visibility setting. If not set, it applies to all the pages.
220 220
      * @remark      If the second parameter is omitted, it sets the default value.
221 221
      */
222
-    public function setInPageTabsVisibility( $bShow=true, $sPageSlug='' ) {
222
+    public function setInPageTabsVisibility( $bShow = true, $sPageSlug = '' ) {
223 223
         $this->_setPageProperty( 
224 224
             'bShowInPageTabs', 
225 225
             'show_in_page_tabs', 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      * @param       string      $sPageSlug      The page slug that applies the setting.    
243 243
      * @remark      If the second parameter is omitted, it sets the default value.
244 244
      */     
245
-    public function setInPageTabTag( $sTag='h3', $sPageSlug='' ) {      
245
+    public function setInPageTabTag( $sTag = 'h3', $sPageSlug = '' ) {      
246 246
         $this->_setPageProperty( 
247 247
             'sInPageTabTag', 
248 248
             'in_page_tab_tag', 
@@ -265,9 +265,9 @@  discard block
 block discarded – undo
265 265
      * @param       string      $sPageSlug  The page slug that applies the setting.    
266 266
      * @remark      If the second parameter is omitted, it sets the default value.
267 267
      */
268
-    public function setPageHeadingTabTag( $sTag='h2', $sPageSlug='' ) {
268
+    public function setPageHeadingTabTag( $sTag = 'h2', $sPageSlug = '' ) {
269 269
         $this->_setPageProperty( 
270
-            'sPageHeadingTabTag',   // property name
270
+            'sPageHeadingTabTag', // property name
271 271
             'page_heading_tab_tag', // property key
272 272
             $sTag, // value
273 273
             $sPageSlug  // page slug
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
             
290 290
             $this->oProp->{$sPropertyName} = $mValue;
291 291
        
292
-            foreach( $this->oProp->aPages as &$_aPage ) {
292
+            foreach ( $this->oProp->aPages as &$_aPage ) {
293 293
                 $_aPage[ $sPropertyKey ] = $mValue;
294 294
 
295 295
             }                        
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @return      void
94 94
      */             
95 95
     public function addInPageTabs( /* $aTab1, $aTab2=null, $_and_more=null */ ) {
96
-        foreach( func_get_args() as $asTab ) { 
96
+        foreach( func_get_args() as $asTab ) {
97 97
             $this->addInPageTab( $asTab ); 
98 98
         }
99 99
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @remark      In-page tabs are different from page-heading tabs which are automatically added with page titles.
112 112
      * @return      void
113 113
      */         
114
-    public function addInPageTab( $asInPageTab ) {    
114
+    public function addInPageTab( $asInPageTab ) {
115 115
         
116 116
         // Target page slug - will be applied when no page slug is specified.
117 117
         static $__sTargetPageSlug; 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $__sTargetPageSlug  = $aInPageTab[ 'page_slug' ]; 
134 134
 
135 135
         // Required keys
136
-        if ( ! isset( $aInPageTab[ 'page_slug' ], $aInPageTab[ 'tab_slug' ] ) ) { 
136
+        if ( ! isset( $aInPageTab[ 'page_slug' ], $aInPageTab[ 'tab_slug' ] ) ) {
137 137
             return; 
138 138
         }
139 139
         
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
      * @param       string      $sPageSlug      The page slug that applies the setting.    
243 243
      * @remark      If the second parameter is omitted, it sets the default value.
244 244
      */     
245
-    public function setInPageTabTag( $sTag='h3', $sPageSlug='' ) {      
245
+    public function setInPageTabTag( $sTag='h3', $sPageSlug='' ) {
246 246
         $this->_setPageProperty( 
247 247
             'sInPageTabTag', 
248 248
             'in_page_tab_tag', 
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -37 removed lines patch added patch discarded remove patch
@@ -52,43 +52,6 @@  discard block
 block discarded – undo
52 52
      * @since       2.0.0
53 53
      * @since       3.0.0     Changed the scope to public. Added page slug target support. 
54 54
      * @since       3.3.1       Moved from `AdminPageFramework_Page`.
55
-     * @param       array     $aTab1 The in-page tab array.
56
-     * <h4>In-Page Tab Array</h4>
57
-     * <ul>
58
-     *     <li>**page_slug** - (string) the page slug that the tab belongs to.</li>
59
-     *     <li>**tab_slug** -  (string) the tab slug. Non-alphabetical characters should not be used including dots(.) and hyphens(-).</li>
60
-     *     <li>**title** - (string) the title of the tab.</li>
61
-     *     <li>**order** - (optional, integer) the order number of the tab. The lager the number is, the lower the position it is placed in the menu.</li>
62
-     *     <li>**show_in_page_tab** - (optional, boolean) default: `true`. If this is set to `false`, the tab title will not be displayed in the tab navigation menu; however, it is still accessible from the direct URL.</li>
63
-     *     <li>**parent_tab_slug** - (optional, string) this needs to be set if the above `show_in_page_tab` argument is `false` so that the parent tab will be emphasized as active when the hidden page is accessed.</li>
64
-     *     <li>**url** - [3.5.0+] (optional, string) If this is set, the link url of the navigation tab will be this url. Use this to create link only tab.</li>
65
-     *     <li>**capability** - [3.6.0+] (optional, string) The capability level.</li>
66
-     *     <li>**if** - [3.6.0+] (optional, boolean) Whether the tab should be displayed or not.</li>
67
-     *     <li>style - [3.6.3+] (optional) (string|array) The path or url of a stylesheet which gets loaded in the head tag. Or inline CSS rules.
68
-     * When custom arguments need to be set such as whether it should be inserted in the footer, set an array holding the following arguments.
69
-     *          <ul>
70
-     *              <li>src - (required, string) the source url or path.</li>    
71
-     *              <li>handle_id - (optional, string) The handle ID of the stylesheet.</li>    
72
-     *              <li>dependencies - (optional, array) The dependency array.</li>    
73
-     *              <li>version - (optional, string) The stylesheet version number.</li>    
74
-     *              <li>media - (optional, string) the description of the field which is inserted into the after the input field tag.</li>    
75
-     *          </ul>
76
-     *     </li>
77
-     *     <li>script - [3.6.3+] (optional) (string|array) The path or url of a JavaScript script which gets loaded in the head tag. Or an inline JavaScript script.
78
-     * When custom arguments need to be set such as whether it should be inserted in the footer, set an array holding the following arguments.
79
-     *          <ul>
80
-     *              <li>src - (required, string) the source url or path.</li>    
81
-     *              <li>handle_id - (optional, string) The handle ID of the stylesheet.</li>    
82
-     *              <li>dependencies - (optional, array) The dependency array.</li>    
83
-     *              <li>version - (optional, string) The stylesheet version number.</li>    
84
-     *              <li>translation - (optional, array) an array holding translation key-value pairs.</li>    
85
-     *          </ul>
86
-     *     </li>
87
-     *     <li>show_debug_info - [3.8.8+] (optional, boolean) Whether to show debug information. If `WP_DEBUG` is false, the debug output will not be displayed. Default: `true`.</li>
88
-     * </ul>
89
-     * @param       array       $aTab2      Another in-page tab array.
90
-     * @param       array       $_and_more  (optional) Add in-page tab arrays as many as necessary to the next parameters.
91
-     * @param       string      $sPageSlug  (optional) If the passed parameter item is a string, it will be stored as the target page slug so that it will be applied to the next passed tab arrays as the page_slug element.
92 55
      * @remark      Accepts variadic parameters; the number of accepted parameters are not limited to three.
93 56
      * @remark      In-page tabs are different from page-heading tabs which is automatically added with page titles.  
94 57
      * @return      void
@@ -278,6 +241,10 @@  discard block
 block discarded – undo
278 241
         /**
279 242
          * Sets a page property.
280 243
          * @since       3.6.0
244
+         * @param string $sPropertyName
245
+         * @param string $sPropertyKey
246
+         * @param boolean|string $mValue
247
+         * @param string $sPageSlug
281 248
          * @return      void
282 249
          */
283 250
         private function _setPageProperty( $sPropertyName, $sPropertyKey, $mValue, $sPageSlug ) {
Please login to merge, or discard this patch.