Completed
Branch master (acc4ae)
by
unknown
03:44
created
development/factory/admin_page/_view/AdminPageFramework_View__Resource.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
                  */
69 69
                 public function _appendInternalAssets( $sInternal, &$aContainer ) {
70 70
                     $_aInternals = array_unique( $aContainer );
71
-                    $sInternal   = PHP_EOL . $sInternal;
72
-                    foreach( $_aInternals as $_iIndex => $_sInternal ) {
73
-                        $sInternal .= $_sInternal . PHP_EOL;
71
+                    $sInternal   = PHP_EOL.$sInternal;
72
+                    foreach ( $_aInternals as $_iIndex => $_sInternal ) {
73
+                        $sInternal .= $_sInternal.PHP_EOL;
74 74
                         unset( $_aInternals[ $_iIndex ] );
75 75
                     }
76 76
                     $aContainer = $_aInternals; // update the container array.
@@ -84,23 +84,23 @@  discard block
 block discarded – undo
84 84
         private function _parseAssets( $oFactory ) {
85 85
             
86 86
             // page
87
-            $_aPageStyles      = $this->getElementAsArray(
87
+            $_aPageStyles = $this->getElementAsArray(
88 88
                 $oFactory->oProp->aPages,
89 89
                 array( $this->sCurrentPageSlug, 'style' )
90 90
             );               
91 91
             $this->_enqueuePageAssets( $_aPageStyles, 'style' );
92 92
             
93
-            $_aPageScripts     = $this->getElementAsArray(
93
+            $_aPageScripts = $this->getElementAsArray(
94 94
                 $oFactory->oProp->aPages,
95 95
                 array( $this->sCurrentPageSlug, 'script' )
96 96
             );
97 97
             $this->_enqueuePageAssets( $_aPageScripts, 'script' );
98 98
             
99 99
             // In-page tabs 
100
-            if ( ! $this->sCurrentTabSlug ) {
100
+            if ( !$this->sCurrentTabSlug ) {
101 101
                 return;
102 102
             }        
103
-            $_aInPageTabStyles  = $this->getElementAsArray(
103
+            $_aInPageTabStyles = $this->getElementAsArray(
104 104
                 $oFactory->oProp->aInPageTabs,
105 105
                 array( $this->sCurrentPageSlug, $this->sCurrentTabSlug, 'style' )
106 106
             );              
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
              * @since       3.6.3
118 118
              * @return      void
119 119
              */    
120
-            private function _enqueuePageAssets( array $aPageAssets, $sType='style' ) {
121
-                $_sMathodName = "_enqueueAsset_" . $sType;
122
-                foreach( $aPageAssets as $_asPageAsset ) {
123
-                    $this->{$_sMathodName}( $_asPageAsset);
120
+            private function _enqueuePageAssets( array $aPageAssets, $sType = 'style' ) {
121
+                $_sMathodName = "_enqueueAsset_".$sType;
122
+                foreach ( $aPageAssets as $_asPageAsset ) {
123
+                    $this->{$_sMathodName}( $_asPageAsset );
124 124
                 }
125 125
             }
126 126
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                     }
146 146
                     
147 147
                     // Insert the CSS rule in the head tag.
148
-                    $this->aCSSRules[] = $_sSRC;
148
+                    $this->aCSSRules[ ] = $_sSRC;
149 149
                     
150 150
                 }                    
151 151
      
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                     }                
171 171
                     
172 172
                     // Insert the scripts in the head tag.                
173
-                    $this->aScripts[] = $_sSRC;
173
+                    $this->aScripts[ ] = $_sSRC;
174 174
                     
175 175
                 }        
176 176
                 
Please login to merge, or discard this patch.
admin_page/_model/delegate/AdminPageFramework_Model_Menu__RegisterMenu.php 3 patches
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         private function _getDefaultPageSlug( array $aPages ) {
168 168
 
169 169
             foreach( $aPages as $_aPage ) {
170
-                if ( ! isset( $_aPage[ 'page_slug' ] ) ) { 
170
+                if ( ! isset( $_aPage[ 'page_slug' ] ) ) {
171 171
                     continue; 
172 172
                 }
173 173
                 return $_aPage[ 'page_slug' ];                
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
                     
380 380
                     foreach( $this->getElementAsArray( $GLOBALS, array( 'submenu', $sMenuSlug ) ) as $_iIndex => $_aSubMenu ) {
381 381
                       
382
-                        if ( ! isset( $_aSubMenu[ 3 ] ) ) { 
382
+                        if ( ! isset( $_aSubMenu[ 3 ] ) ) {
383 383
                             continue; 
384 384
                         }
385 385
                                                
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
                             $sPageTitle,
395 395
                             $sPageSlug,
396 396
                         );
397
-                        if ( $_aA !== $_aB ) { 
397
+                        if ( $_aA !== $_aB ) {
398 398
                             continue;
399 399
                         }
400 400
                         return $_iIndex;
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
                  * @since       3.1.1       Moved from `AdminPageFramework_Menu`. Chagned the return type.
412 412
                  * @return      array       removed menu item.
413 413
                  */
414
-                private function _removePageSubmenuItem( $nSubMenuPageIndex, $sMenuSlug, $sPageSlug, $sMenuTitle ){
414
+                private function _removePageSubmenuItem( $nSubMenuPageIndex, $sMenuSlug, $sPageSlug, $sMenuTitle ) {
415 415
  
416 416
                     $_aRemovedMenuItem = $this->_removePageSubMenuItemByIndex( 
417 417
                         $nSubMenuPageIndex,
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
      * @callback    action      admin_menu
518 518
      * @internal
519 519
      */    
520
-    public function _replyToRemoveRootMenuPage() {      
520
+    public function _replyToRemoveRootMenuPage() {
521 521
         
522 522
         // After adding the sub menus, if the root menu is created, remove the page that is automatically created when registering the root menu.
523 523
         if ( ! $this->oFactory->oProp->aRootMenu[ 'fCreateRoot' ] ) {
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,7 @@  discard block
 block discarded – undo
26 26
      * Sets up hooks
27 27
      * 
28 28
      * @internal
29
+     * @param AdminPageFramework_Router $oFactory
29 30
      */
30 31
     public function __construct( $oFactory, $sActionHook='admin_menu' ) {
31 32
         
@@ -253,6 +254,7 @@  discard block
 block discarded – undo
253 254
              * @since       3.3.0
254 255
              * @since       3.1.1       Moved from `AdminPageFramework_Menu`.
255 256
              * @since       3.7.4       Added the `$nOrder` parameter.
257
+             * @param string $sMenuSlug
256 258
              * @return      string      The page hook of the added page.
257 259
              */
258 260
             private function _addPageSubmenuItem( $sRootPageSlug, $sMenuSlug, $sPageSlug, $sPageTitle, $sMenuTitle, $sCapability, $bShowInMenu, $nOrder ) {
@@ -354,6 +356,7 @@  discard block
 block discarded – undo
354 356
                 /**
355 357
                  * Sets up hooks for the page.
356 358
                  * @since       3.7.4
359
+                 * @param false|string $sPageHook
357 360
                  */
358 361
                 private function _setPageHooks( $sPageHook, $sPageSlug ) {
359 362
                                     
@@ -405,7 +408,7 @@  discard block
 block discarded – undo
405 408
                 /**
406 409
                  * @since       3.7.4
407 410
                  * @return      void
408
-                 * @param       numeric     $$nOrder            A user set order (menu position, index).
411
+                 * @param       numeric     $nOrder            A user set order (menu position, index).
409 412
                  * @param       array       $aSubMenuItem       The sub menu item array set in the global `$submenu` array.
410 413
                  */
411 414
                 private function _setSubMenuPageByIndex( $nOrder, $aSubMenuItem, $sMenuSlug ) {
@@ -529,6 +532,7 @@  discard block
 block discarded – undo
529 532
              * @since       3.1.1       Moved from `AdminPageFramework_Menu`.
530 533
              * @since       3.5.3       Added the `$bShowInMenu` parameter.
531 534
              * @since       3.7.4       Added the `$nOrder` parameter.
535
+             * @param string $sMenuSlug
532 536
              * @return      void
533 537
              */
534 538
             private function _addLinkSubmenuItem( $sMenuSlug, $sTitle, $sCapability, $sHref, $bShowInMenu, $nOrder ) {
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      * 
28 28
      * @internal
29 29
      */
30
-    public function __construct( $oFactory, $sActionHook='admin_menu' ) {
30
+    public function __construct( $oFactory, $sActionHook = 'admin_menu' ) {
31 31
         
32 32
         $this->oFactory = $oFactory;
33 33
         
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public function _replyToRegisterRootMenu() {
76 76
         
77 77
         // If the root menu label is not set but the slug is set, 
78
-        if ( ! $this->oFactory->oProp->aRootMenu[ 'fCreateRoot' ] ) {
78
+        if ( !$this->oFactory->oProp->aRootMenu[ 'fCreateRoot' ] ) {
79 79
             return;
80 80
         }
81 81
         $this->_registerRootMenuPage();
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
             }
98 98
 
99 99
             $this->oFactory->oProp->aRootMenu[ '_page_hook' ] = add_menu_page(  
100
-                $this->oFactory->oProp->sClassName,                 // Page title - will be invisible anyway
101
-                $this->oFactory->oProp->aRootMenu[ 'sTitle' ],      // Menu title - should be the root page title.
102
-                $this->oFactory->oProp->sCapability,                // Capability - access right
103
-                $this->oFactory->oProp->aRootMenu[ 'sPageSlug' ],   // Menu ID 
104
-                '',                                       // Callback function for the page content output - the root page will be removed so no need to register a function.
105
-                $this->oFactory->oProp->aRootMenu[ 'sIcon16x16' ],  // icon path
100
+                $this->oFactory->oProp->sClassName, // Page title - will be invisible anyway
101
+                $this->oFactory->oProp->aRootMenu[ 'sTitle' ], // Menu title - should be the root page title.
102
+                $this->oFactory->oProp->sCapability, // Capability - access right
103
+                $this->oFactory->oProp->aRootMenu[ 'sPageSlug' ], // Menu ID 
104
+                '', // Callback function for the page content output - the root page will be removed so no need to register a function.
105
+                $this->oFactory->oProp->aRootMenu[ 'sIcon16x16' ], // icon path
106 106
                 $this->getElement( 
107 107
                     $this->oFactory->oProp->aRootMenu, 
108 108
                     'iPosition', 
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
 
125 125
         // Let external scripts add sub-menu pages.
126 126
         $_aPages = $this->addAndApplyFilter( 
127
-            $this->oFactory,    // caller object
128
-            "pages_{$this->oFactory->oProp->sClassName}",   // filter
127
+            $this->oFactory, // caller object
128
+            "pages_{$this->oFactory->oProp->sClassName}", // filter
129 129
             $this->oFactory->oProp->aPages  // arguments
130 130
         );
131 131
         
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         // Format the `$aPages` property and register the pages.
136 136
         $_iParsedIndex    = 0;
137 137
         $_aFormattedPages = array();
138
-        foreach( $_aPages as $_aSubMenuItem ) {
138
+        foreach ( $_aPages as $_aSubMenuItem ) {
139 139
             
140 140
             // needs to be sanitized because there are hook filters applied to this array.
141 141
             $_oFormatter = new AdminPageFramework_Format_SubMenuItem( 
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
          */
171 171
         private function _getDefaultPageSlug( array $aPages ) {
172 172
 
173
-            foreach( $aPages as $_aPage ) {
174
-                if ( ! isset( $_aPage[ 'page_slug' ] ) ) { 
173
+            foreach ( $aPages as $_aPage ) {
174
+                if ( !isset( $_aPage[ 'page_slug' ] ) ) { 
175 175
                     continue; 
176 176
                 }
177 177
                 return $_aPage[ 'page_slug' ];                
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
          */ 
194 194
         private function _registerSubMenuItem( array $aArgs ) {
195 195
 
196
-            if ( ! current_user_can( $aArgs[ 'capability' ] ) ) {
196
+            if ( !current_user_can( $aArgs[ 'capability' ] ) ) {
197 197
                 return '';
198 198
             }
199 199
                                     
@@ -257,14 +257,14 @@  discard block
 block discarded – undo
257 257
              */
258 258
             private function _addPageSubmenuItem( $sRootPageSlug, $sMenuSlug, $sPageSlug, $sPageTitle, $sMenuTitle, $sCapability, $bShowInMenu, $nOrder ) {
259 259
                 
260
-                if ( ! $sPageSlug ) {
260
+                if ( !$sPageSlug ) {
261 261
                     return '';
262 262
                 }
263 263
                 $_sPageHook = $this->___addSubMenuPage(
264
-                    $sRootPageSlug,         // the root (parent) page slug
265
-                    $sPageTitle,            // page title
266
-                    $sMenuTitle,            // menu title
267
-                    $sCapability,           // capability
264
+                    $sRootPageSlug, // the root (parent) page slug
265
+                    $sPageTitle, // page title
266
+                    $sMenuTitle, // menu title
267
+                    $sCapability, // capability
268 268
                     $sPageSlug              // menu slug
269 269
                 );
270 270
 
@@ -293,14 +293,14 @@  discard block
 block discarded – undo
293 293
                 $_aRemovedMenuItem = $this->_removePageSubmenuItem( $_nSubMenuPageIndex, $sMenuSlug, $sPageSlug, $sMenuTitle );
294 294
                 
295 295
                 // If the visibility option is `false`, remove the one just added from the sub-menu global array
296
-                if ( ! $bShowInMenu && ! $this->_isCurrentPage( $sPageSlug ) ) {
296
+                if ( !$bShowInMenu && !$this->_isCurrentPage( $sPageSlug ) ) {
297 297
                     return $_sPageHook;
298 298
                 }                
299 299
                 
300 300
                 // Set the order index in the element of the `submenu` global array.
301 301
                 $this->_setSubMenuPageByIndex( 
302
-                    $nOrder,                // user-set order
303
-                    $_aRemovedMenuItem,     // will be reassign with a new index
302
+                    $nOrder, // user-set order
303
+                    $_aRemovedMenuItem, // will be reassign with a new index
304 304
                     $sMenuSlug
305 305
                 );
306 306
 
@@ -321,21 +321,21 @@  discard block
 block discarded – undo
321 321
                  * @uses        add_submenu_page
322 322
                  */
323 323
                 private function ___addSubMenuPage(
324
-                    $sRootPageSlug,         // the root (parent) page slug
325
-                    $sPageTitle,            // page title
326
-                    $sMenuTitle,            // menu title
327
-                    $sCapability,           // capability
324
+                    $sRootPageSlug, // the root (parent) page slug
325
+                    $sPageTitle, // page title
326
+                    $sMenuTitle, // menu title
327
+                    $sCapability, // capability
328 328
                     $sPageSlug              // menu slug
329 329
                 ) {
330 330
                     if ( $this->oFactory->oProp->bIsAdminAjax ) {
331 331
                         return $sPageSlug;
332 332
                     }
333 333
                     return add_submenu_page(
334
-                        $sRootPageSlug,         // the root (parent) page slug
335
-                        $sPageTitle,            // page title
336
-                        $sMenuTitle,            // menu title
337
-                        $sCapability,           // capability
338
-                        $sPageSlug,             // menu slug
334
+                        $sRootPageSlug, // the root (parent) page slug
335
+                        $sPageTitle, // page title
336
+                        $sMenuTitle, // menu title
337
+                        $sCapability, // capability
338
+                        $sPageSlug, // menu slug
339 339
                         array( $this->oFactory, '_replyToRenderPage' )  // callback 3.7.10+
340 340
                     );
341 341
                 }
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
                      */
370 370
                     add_action( 
371 371
                         'current_screen', 
372
-                        array( $this->oFactory, "load_pre_" . $sPageSlug ), 
372
+                        array( $this->oFactory, "load_pre_".$sPageSlug ), 
373 373
                         20 
374 374
                     );
375 375
                     /**
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
                      */
379 379
                     add_action(
380 380
                         'pseudo_current_screen',
381
-                        array( $this->oFactory, "load_pre_" . $sPageSlug ),
381
+                        array( $this->oFactory, "load_pre_".$sPageSlug ),
382 382
                         20
383 383
                     );
384 384
                     
@@ -387,15 +387,15 @@  discard block
 block discarded – undo
387 387
                      * Set a low priority because the user may add in-page tabs in their callback method of this action hook.
388 388
                      * @since       3.6.3
389 389
                      */
390
-                    add_action( "load_" . $sPageSlug, array( $this->oFactory, '_replyToFinalizeInPageTabs' ), 9999 );
390
+                    add_action( "load_".$sPageSlug, array( $this->oFactory, '_replyToFinalizeInPageTabs' ), 9999 );
391 391
                     
392 392
                     // 3.6.3+
393
-                    add_action( "load_after_" . $sPageSlug, array( $this->oFactory, '_replyToEnqueuePageAssets' ) );
394
-                    add_action( "load_after_" . $sPageSlug, array( $this->oFactory, '_replyToEnablePageMetaBoxes' ) );  // 3.7.10+
393
+                    add_action( "load_after_".$sPageSlug, array( $this->oFactory, '_replyToEnqueuePageAssets' ) );
394
+                    add_action( "load_after_".$sPageSlug, array( $this->oFactory, '_replyToEnablePageMetaBoxes' ) ); // 3.7.10+
395 395
                           
396 396
                     $this->oFactory->oProp->aPageHooks[ $sPageSlug ] = $this->getAOrB(
397 397
                         is_network_admin(),
398
-                        $sPageHook . '-network',
398
+                        $sPageHook.'-network',
399 399
                         $sPageHook
400 400
                     );                          
401 401
 
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 
413 413
                     $_nNewIndex = $this->getUnusedNumericIndex( 
414 414
                         $this->getElementAsArray( $GLOBALS, array( 'submenu', $sMenuSlug ) ), // subject array to parser
415
-                        $nOrder,    // a desired menu position
415
+                        $nOrder, // a desired menu position
416 416
                         5           // offset 
417 417
                     );
418 418
 
@@ -426,9 +426,9 @@  discard block
 block discarded – undo
426 426
                  */
427 427
                 private function _getSubMenuPageIndex( $sMenuSlug, $sMenuTitle, $sPageTitle, $sPageSlug ) {
428 428
                     
429
-                    foreach( $this->getElementAsArray( $GLOBALS, array( 'submenu', $sMenuSlug ) ) as $_iIndex => $_aSubMenu ) {
429
+                    foreach ( $this->getElementAsArray( $GLOBALS, array( 'submenu', $sMenuSlug ) ) as $_iIndex => $_aSubMenu ) {
430 430
                       
431
-                        if ( ! isset( $_aSubMenu[ 3 ] ) ) { 
431
+                        if ( !isset( $_aSubMenu[ 3 ] ) ) { 
432 432
                             continue; 
433 433
                         }
434 434
                                                
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
                  * @since       3.1.1       Moved from `AdminPageFramework_Menu`. Chagned the return type.
461 461
                  * @return      array       removed menu item.
462 462
                  */
463
-                private function _removePageSubmenuItem( $nSubMenuPageIndex, $sMenuSlug, $sPageSlug, $sMenuTitle ){
463
+                private function _removePageSubmenuItem( $nSubMenuPageIndex, $sMenuSlug, $sPageSlug, $sMenuTitle ) {
464 464
  
465 465
                     $_aRemovedMenuItem = $this->_removePageSubMenuItemByIndex( 
466 466
                         $nSubMenuPageIndex,
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
              */
534 534
             private function _addLinkSubmenuItem( $sMenuSlug, $sTitle, $sCapability, $sHref, $bShowInMenu, $nOrder ) {
535 535
                 
536
-                if ( ! $bShowInMenu ) {
536
+                if ( !$bShowInMenu ) {
537 537
                     return;
538 538
                 }
539 539
     
@@ -548,9 +548,9 @@  discard block
 block discarded – undo
548 548
                     5   // offset
549 549
                 );
550 550
                 $_aSubMenuItems[ $_nIndex ] = array(
551
-                    $sTitle,        // 0
552
-                    $sCapability,   // 1
553
-                    $sHref,         // 2   
551
+                    $sTitle, // 0
552
+                    $sCapability, // 1
553
+                    $sHref, // 2   
554 554
                 );
555 555
                 $GLOBALS[ 'submenu' ][ $sMenuSlug ] = $_aSubMenuItems;                
556 556
                 
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
     public function _replyToRemoveRootMenuPage() {      
570 570
         
571 571
         // After adding the sub menus, if the root menu is created, remove the page that is automatically created when registering the root menu.
572
-        if ( ! $this->oFactory->oProp->aRootMenu[ 'fCreateRoot' ] ) {
572
+        if ( !$this->oFactory->oProp->aRootMenu[ 'fCreateRoot' ] ) {
573 573
             return;
574 574
         }
575 575
         if ( $this->oFactory->oProp->bIsAdminAjax ) {
Please login to merge, or discard this patch.
development/factory/_common/_abstract/AdminPageFramework_Factory_Model.php 3 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -203,6 +203,7 @@  discard block
 block discarded – undo
203 203
          * Constructs a WordPress filter hook name.
204 204
          * @internal
205 205
          * @since       3.8.4
206
+         * @param string $sPrefix
206 207
          * @return      string
207 208
          */
208 209
         private function _getHookNameByFieldsetAndPrefix( $sPrefix, $aFieldset ) {
@@ -339,8 +340,6 @@  discard block
 block discarded – undo
339 340
      * @since       3.7.0      Changed back the visibility scope to protected as there is the `getFieldErrors()` public method.
340 341
      * @access      protected
341 342
      * @internal
342
-     * @param       string      $sID        deprecated
343
-     * @param       boolean     $bDelete    whether or not the transient should be deleted after retrieving it. 
344 343
      * @return      array
345 344
      * @deprecated  3.7.0      Use `getFieldErrors()` instead. Kept for backward compatibility.
346 345
      */
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @since       3.7.0
94 94
      * @return      array       The modified section-sets definition array.
95 95
      */    
96
-    public function _replyToModifySectionsets( $aSectionsets ) {    
96
+    public function _replyToModifySectionsets( $aSectionsets ) {
97 97
         
98 98
         return $this->oUtil->addAndApplyFilter( 
99 99
             $this,  // caller factory object
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
          * An alias of `_setLastInputs()`.
365 365
          * @deprecated      3.7.0
366 366
          */
367
-        public function _setLastInput( $aLastInputs )  {
367
+        public function _setLastInput( $aLastInputs ) {
368 368
             return $this->setLastInputs( $aLastInputs );
369 369
         }    
370 370
 
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         
32 32
         add_filter(
33 33
             // 'field_types_admin_page_framework',
34
-            'field_types_' . $oProp->sClassName,
34
+            'field_types_'.$oProp->sClassName,
35 35
             array( $this, '_replyToFilterFieldTypeDefinitions' )
36 36
         );
37 37
         
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             'title'      => null,
54 54
             'help_aside' => null,
55 55
         );
56
-        if ( ! $aFieldset[ 'help' ] ) {
56
+        if ( !$aFieldset[ 'help' ] ) {
57 57
             return;
58 58
         }
59 59
         $this->oHelpPane->_addHelpTextForFormFields( 
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
     public function _replyToFilterFieldTypeDefinitions( $aFieldTypeDefinitions ) {
74 74
         
75 75
         // Not triggering `__call()` as the filter is fired manually in the form class.
76
-        if ( method_exists( $this, 'field_types_' . $this->oProp->sClassName ) ) {
76
+        if ( method_exists( $this, 'field_types_'.$this->oProp->sClassName ) ) {
77 77
             return call_user_func_array(
78
-                array( $this, 'field_types_' . $this->oProp->sClassName ),
78
+                array( $this, 'field_types_'.$this->oProp->sClassName ),
79 79
                 array( $aFieldTypeDefinitions )
80 80
             );
81 81
         }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     public function _replyToModifySectionsets( $aSectionsets ) {    
97 97
         
98 98
         return $this->oUtil->addAndApplyFilter( 
99
-            $this,  // caller factory object
99
+            $this, // caller factory object
100 100
             "sections_{$this->oProp->sClassName}", 
101 101
             $aSectionsets
102 102
         );
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     public function _replyToModifyFieldsets( $aFieldsets, $aSectionsets ) {
117 117
 
118 118
         // Apply filters to added field-sets
119
-        foreach( $aFieldsets as $_sSectionPath => $_aFields ) {
119
+        foreach ( $aFieldsets as $_sSectionPath => $_aFields ) {
120 120
             $_aSectionPath  = explode( '|', $_sSectionPath );
121 121
             $_sFilterSuffix = implode( '_', $_aSectionPath );
122 122
             $aFieldsets[ $_sSectionPath ] = $this->oUtil->addAndApplyFilter(
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 $_aFields
126 126
             ); 
127 127
         }
128
-        $aFieldsets =  $this->oUtil->addAndApplyFilter( 
128
+        $aFieldsets = $this->oUtil->addAndApplyFilter( 
129 129
             $this,
130 130
             "fields_{$this->oProp->sClassName}",
131 131
             $aFieldsets
@@ -195,14 +195,14 @@  discard block
 block discarded – undo
195 195
          */
196 196
         private function _getHookNameByFieldsetAndPrefix( $sPrefix, $aFieldset ) {
197 197
             
198
-            $_sFieldPart    = '_' . implode( '_', $aFieldset[ '_field_path_array' ] );
198
+            $_sFieldPart    = '_'.implode( '_', $aFieldset[ '_field_path_array' ] );
199 199
             $_sSectionPart  = implode( '_', $aFieldset[ '_section_path_array' ] );
200 200
             $_sSectionPart  = $this->oUtil->getAOrB(
201 201
                 '_default' === $_sSectionPart,
202 202
                 '',
203
-                '_' . $_sSectionPart
203
+                '_'.$_sSectionPart
204 204
             );
205
-            return $sPrefix . $this->oProp->sClassName . $_sSectionPart . $_sFieldPart;
205
+            return $sPrefix.$this->oProp->sClassName.$_sSectionPart.$_sFieldPart;
206 206
             
207 207
         }
208 208
                
@@ -272,9 +272,9 @@  discard block
 block discarded – undo
272 272
     public function _replyToGetSavedFormData() {
273 273
         
274 274
         // Must update the property with the filtered value.
275
-        $this->oProp->aOptions =  $this->oUtil->addAndApplyFilter(
275
+        $this->oProp->aOptions = $this->oUtil->addAndApplyFilter(
276 276
             $this, // the caller factory object
277
-            'options_' . $this->oProp->sClassName,
277
+            'options_'.$this->oProp->sClassName,
278 278
             $this->oProp->aOptions      // subject value to be filtered
279 279
         );
280 280
         return $this->oProp->aOptions;
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
          * An alias of `_setLastInputs()`.
365 365
          * @deprecated      3.7.0
366 366
          */
367
-        public function _setLastInput( $aLastInputs )  {
367
+        public function _setLastInput( $aLastInputs ) {
368 368
             return $this->setLastInputs( $aLastInputs );
369 369
         }    
370 370
 
Please login to merge, or discard this patch.
factory/_common/form/_view/AdminPageFramework_Form_View___ToolTip.php 3 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,6 @@  discard block
 block discarded – undo
42 42
      * Sets up properties.
43 43
      * @since       3.6.0
44 44
      * @since       3.7.0           Changed the parameter structure.
45
-     * @param       array|string    $asArguments        The content output or the tooltip argument array.
46
-     * @param       string          $sTitleElementID    Not used at the moment.
47 45
      */
48 46
     public function __construct( /* $aArguments, $sTitleElementID */ ) {
49 47
 
@@ -170,6 +168,7 @@  discard block
 block discarded – undo
170 168
 
171 169
     /**
172 170
      * Generates HTML attributes of the specified element.
171
+     * @param string $sElementKey
173 172
      * @return      string
174 173
      * @since       3.8.5
175 174
      */
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * Stores the default argument values.
23 23
      */
24
-    public $aArguments      = array(
24
+    public $aArguments = array(
25 25
         'attributes'    => array(
26 26
             'container'   => array(),   
27 27
             'title'       => array(),
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
             'description' => array(),
30 30
             'icon'        => array(),
31 31
         ), 
32
-        'icon'          => null,    // the icon output to override
33
-        'dash-icon'     => 'dashicons-editor-help',   // the dash-icon class selector for the icon
34
-        'icon_alt_text' => '[?]',   // [3.8.5+] alternative text when icon is not available. For WP v3.7.x or below.
32
+        'icon'          => null, // the icon output to override
33
+        'dash-icon'     => 'dashicons-editor-help', // the dash-icon class selector for the icon
34
+        'icon_alt_text' => '[?]', // [3.8.5+] alternative text when icon is not available. For WP v3.7.x or below.
35 35
         'title'         => null,  
36
-        'content'       => null,    // will be assigned in the constructor
36
+        'content'       => null, // will be assigned in the constructor
37 37
     );
38 38
     
39 39
     public $sTitleElementID;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 if ( is_string( $asContent ) ) {
91 91
                     return true;
92 92
                 }
93
-                if ( is_array( $asContent ) && ! $this->isAssociative( $asContent ) ) {
93
+                if ( is_array( $asContent ) && !$this->isAssociative( $asContent ) ) {
94 94
                     return true;
95 95
                 }
96 96
                 return false;
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
      * @return      string      The output.
105 105
      */
106 106
     public function get() {
107
-        if ( ! $this->aArguments[ 'content' ] ) {
107
+        if ( !$this->aArguments[ 'content' ] ) {
108 108
             return '';
109 109
         }
110
-        return "<a " . $this->_getElementAttributes( 'container', 'admin-page-framework-form-tooltip' ) . ">"
110
+        return "<a ".$this->_getElementAttributes( 'container', 'admin-page-framework-form-tooltip' ).">"
111 111
                 . $this->_getTipLinkIcon()
112
-                . "<span " . $this->_getElementAttributes( 'content', 'admin-page-framework-form-tooltip-content' ) . ">"
112
+                . "<span ".$this->_getElementAttributes( 'content', 'admin-page-framework-form-tooltip-content' ).">"
113 113
                     . $this->_getTipTitle()
114 114
                     . $this->_getDescriptions()
115 115
                 . "</span>"
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                 return $this->aArguments[ 'icon' ];
128 128
             }
129 129
             if ( version_compare( $GLOBALS[ 'wp_version' ], '3.8', '>=' ) ) {
130
-                return "<span " . $this->_getElementAttributes( 
130
+                return "<span ".$this->_getElementAttributes( 
131 131
                         'icon', 
132 132
                         array(
133 133
                             'dashicons', 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
          */
146 146
         private function _getTipTitle() {
147 147
             if ( isset( $this->aArguments[ 'title' ] ) ) {
148
-                return "<span " . $this->_getElementAttributes( 'title', 'admin-page-framework-form-tooltip-title' ) . ">"
148
+                return "<span ".$this->_getElementAttributes( 'title', 'admin-page-framework-form-tooltip-title' ).">"
149 149
                     . $this->aArguments[ 'title' ]
150 150
                     . "</span>";
151 151
             }
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
          */
158 158
         private function _getDescriptions() {         
159 159
             if ( isset( $this->aArguments[ 'content' ] ) ) {
160
-                return "<span " . $this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ) . ">"
160
+                return "<span ".$this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ).">"
161 161
                         . implode( 
162
-                            "</span><span " . $this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ) . ">", 
162
+                            "</span><span ".$this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ).">", 
163 163
                             $this->getAsArray( $this->aArguments[ 'content' ] )
164 164
                         )
165 165
                     . "</span>"
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $_aContainerAttributes = $this->getElementAsArray(
179 179
             $this->aArguments,
180 180
             array( 'attributes', $sElementKey )
181
-        ) + array( 'class' => '' ) ;
181
+        ) + array( 'class' => '' );
182 182
         $_aContainerAttributes[ 'class' ] = $this->getClassAttribute( 
183 183
             $_aContainerAttributes[ 'class' ], 
184 184
             $asClassSelectors 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * @extends     AdminPageFramework_Form_View___Section_Base
16 16
  * @internal
17 17
  */
18
-class AdminPageFramework_Form_View___ToolTip extends AdminPageFramework_Form_View___Section_Base {            
18
+class AdminPageFramework_Form_View___ToolTip extends AdminPageFramework_Form_View___Section_Base {
19 19
   
20 20
     /**
21 21
      * Stores the default argument values.
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
          * @since       3.7.0
155 155
          * @return      string
156 156
          */
157
-        private function _getDescriptions() {         
157
+        private function _getDescriptions() {
158 158
             if ( isset( $this->aArguments[ 'content' ] ) ) {
159 159
                 return "<span " . $this->_getElementAttributes( 'description', 'admin-page-framework-form-tooltip-description' ) . ">"
160 160
                         . implode( 
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___FieldsetTableRow.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
         $_aParameters = func_get_args() + array( 
35 35
             $this->aFieldset, 
36
-            $this->aSavedData,    // passed by reference. @todo: examine why it needs to be passed by reference.
36
+            $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference.
37 37
             $this->aFieldErrors, 
38 38
             $this->aFieldTypeDefinitions, 
39 39
             $this->aCallbacks, // field output element callables.        
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
         
62 62
         $aFieldset = $this->aFieldset;
63 63
 
64
-        if ( ! $this->isNormalPlacement( $aFieldset ) ) {
64
+        if ( !$this->isNormalPlacement( $aFieldset ) ) {
65 65
             return '';
66 66
         }
67 67
 
68
-        $_oFieldrowAttribute   = new AdminPageFramework_Form_View___Attribute_Fieldrow( 
68
+        $_oFieldrowAttribute = new AdminPageFramework_Form_View___Attribute_Fieldrow( 
69 69
             $aFieldset,
70 70
             array( 
71
-                'id'        => 'fieldrow-' . $aFieldset[ 'tag_id' ],
71
+                'id'        => 'fieldrow-'.$aFieldset[ 'tag_id' ],
72 72
                 'valign'    => 'top',
73 73
                 'class'     => 'admin-page-framework-fieldrow',
74 74
             )                
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         return $this->_getFieldByContainer( 
78 78
             $aFieldset, 
79 79
             array(
80
-                'open_container'    => "<tr " . $_oFieldrowAttribute->get() . ">",
80
+                'open_container'    => "<tr ".$_oFieldrowAttribute->get().">",
81 81
                 'close_container'   => "</tr>",
82 82
                 'open_title'        => "<th>",
83 83
                 'close_title'       => "</th>",
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
                 $this->aCallbacks,
127 127
                 $this->oMsg
128 128
             );
129
-            $_aOutput   = array();
129
+            $_aOutput = array();
130 130
             if ( $aFieldset[ 'show_title_column' ] ) {
131
-                $_aOutput[] = $aOpenCloseTags[ 'open_title' ]
131
+                $_aOutput[ ] = $aOpenCloseTags[ 'open_title' ]
132 132
                         . $_oFieldTitle->get()
133 133
                     . $aOpenCloseTags[ 'close_title' ];
134 134
             }
135
-            $_aOutput[] = $aOpenCloseTags[ 'open_main' ]
135
+            $_aOutput[ ] = $aOpenCloseTags[ 'open_main' ]
136 136
                     // . call_user_func_array( $hfCallback, array( $aFieldset ) )
137 137
                     . $this->getFieldsetOutput( $aFieldset )
138 138
                 . $aOpenCloseTags[ 'close_main' ];
Please login to merge, or discard this patch.
factory/_common/form/_view/AdminPageFramework_Form_View___DebugInfo.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  */
20 20
 class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility {            
21 21
 
22
-    public $sStructureType   = '';
22
+    public $sStructureType = '';
23 23
     
24 24
     /**
25 25
      * @since       3.8.5
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function get() {
59 59
         
60
-        if ( ! $this->_shouldProceed() ) {
60
+        if ( !$this->_shouldProceed() ) {
61 61
             return '';
62 62
         }
63 63
         
64 64
         return "<div class='admin-page-framework-info'>" 
65
-                . $this->oMsg->get( 'debug_info' ) . ': '
65
+                . $this->oMsg->get( 'debug_info' ).': '
66 66
                     . $this->getFrameworkNameVersion()
67 67
             . "</div>";
68 68
         
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
          */
74 74
         private function _shouldProceed() {
75 75
 
76
-            if ( ! $this->callBack( $this->aCallbacks[ 'show_debug_info' ], true ) ) {
76
+            if ( !$this->callBack( $this->aCallbacks[ 'show_debug_info' ], true ) ) {
77 77
                 return false;
78 78
             }        
79 79
             // For the generic admin pages, do no show debug information for each section.
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
  * @extends     AdminPageFramework_FrameworkUtility
17 17
  * @internal
18 18
  */
19
-class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility {            
19
+class AdminPageFramework_Form_View___DebugInfo extends AdminPageFramework_FrameworkUtility {
20 20
 
21 21
     public $sStructureType   = '';
22 22
     
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_checkbox.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
      * Defines the default key-values of this field type. 
78 78
      */
79 79
     protected $aDefaultKeys = array(
80
-        'select_all_button'     => false,        // 3.3.0+   to change the label, set the label here
81
-        'select_none_button'    => false,        // 3.3.0+   to change the label, set the label here
82
-        'save_unchecked'        => true,        // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
80
+        'select_all_button'     => false, // 3.3.0+   to change the label, set the label here
81
+        'select_none_button'    => false, // 3.3.0+   to change the label, set the label here
82
+        'save_unchecked'        => true, // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
83 83
     );
84 84
         
85 85
     /**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */ 
92 92
     protected function getScripts() {
93 93
         new AdminPageFramework_Form_View___Script_CheckboxSelector;
94
-        $_sClassSelectorSelectAll  = $this->_getSelectButtonClassSelectors( 
94
+        $_sClassSelectorSelectAll = $this->_getSelectButtonClassSelectors( 
95 95
             $this->aFieldTypeSlugs, 
96 96
             'select_all_button' // data attribute
97 97
         );
@@ -118,14 +118,14 @@  discard block
 block discarded – undo
118 118
          * @return      string
119 119
          * @internal
120 120
          */
121
-        private function _getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute='select_all_button' ) {
121
+        private function _getSelectButtonClassSelectors( array $aFieldTypeSlugs, $sDataAttribute = 'select_all_button' ) {
122 122
             
123 123
             $_aClassSelectors = array();
124 124
             foreach ( $aFieldTypeSlugs as $_sSlug ) {
125
-                if ( ! is_scalar( $_sSlug ) ) {
125
+                if ( !is_scalar( $_sSlug ) ) {
126 126
                     continue;
127 127
                 }
128
-                $_aClassSelectors[] = '.admin-page-framework-checkbox-container-' . $_sSlug . "[data-{$sDataAttribute}]";
128
+                $_aClassSelectors[ ] = '.admin-page-framework-checkbox-container-'.$_sSlug."[data-{$sDataAttribute}]";
129 129
             }
130 130
             return implode( ',', $_aClassSelectors );
131 131
             
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
 
187 187
         $_aOutput       = array();
188 188
         $_bIsMultiple   = is_array( $aField[ 'label' ] );
189
-        foreach( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) {
190
-            $_aOutput[] = $this->_getEachCheckboxOutput( 
189
+        foreach ( $this->getAsArray( $aField[ 'label' ], true ) as $_sKey => $_sLabel ) {
190
+            $_aOutput[ ] = $this->_getEachCheckboxOutput( 
191 191
                 $aField, 
192 192
                 $_bIsMultiple 
193 193
                     ? $_sKey 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 $_sLabel
196 196
             );
197 197
         }        
198
-        return "<div " . $this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ) . ">"
198
+        return "<div ".$this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ).">"
199 199
                 . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element.
200 200
                 . implode( PHP_EOL, $_aOutput )
201 201
             . "</div>";
@@ -210,12 +210,12 @@  discard block
 block discarded – undo
210 210
          */
211 211
         protected function _getCheckboxContainerAttributes( array $aField ) {
212 212
             return array(
213
-                'class'                     => 'admin-page-framework-checkbox-container-' . $aField[ 'type' ],
213
+                'class'                     => 'admin-page-framework-checkbox-container-'.$aField[ 'type' ],
214 214
                 'data-select_all_button'    => $aField[ 'select_all_button' ] 
215
-                    ? ( ! is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] )
215
+                    ? ( !is_string( $aField[ 'select_all_button' ] ) ? $this->oMsg->get( 'select_all' ) : $aField[ 'select_all_button' ] )
216 216
                     : null,
217 217
                 'data-select_none_button'   => $aField[ 'select_none_button' ] 
218
-                    ? ( ! is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] )
218
+                    ? ( !is_string( $aField[ 'select_none_button' ] ) ? $this->oMsg->get( 'select_none' ) : $aField[ 'select_none_button' ] )
219 219
                     : null,
220 220
             );            
221 221
         }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         private function _getEachCheckboxOutput( array $aField, $sKey, $sLabel ) {
231 231
 
232 232
             $_aInputAttributes = array(
233
-                'data-key'  => $sKey,   // 3.8.8+ For the `post_type_taxonomy` field type.
233
+                'data-key'  => $sKey, // 3.8.8+ For the `post_type_taxonomy` field type.
234 234
             ) + $aField[ 'attributes' ];
235 235
             $_oCheckbox = new AdminPageFramework_Input_checkbox( 
236 236
                 $_aInputAttributes,
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
             $_oCheckbox->setAttributesByKey( $sKey );
242 242
             $_oCheckbox->addClass( $this->_sCheckboxClassSelector );
243 243
             return $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $aField[ 'label' ] )
244
-                . "<div " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-checkbox-label' ) . ">" 
245
-                    . "<label " . $this->getAttributes( 
244
+                . "<div ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-checkbox-label' ).">" 
245
+                    . "<label ".$this->getAttributes( 
246 246
                         array(
247 247
                             'for'   => $_oCheckbox->getAttribute( 'id' ),
248 248
                             'class' => $_oCheckbox->getAttribute( 'disabled' )
Please login to merge, or discard this patch.
_common/form/field_type/AdminPageFramework_WalkerTaxonomyChecklist.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -63,16 +63,16 @@  discard block
 block discarded – undo
63 63
      *  - use_desc_for_title    (boolean|int) default is 1 - Whether to use the category description as the title attribute. side note: the framework enables this by default.
64 64
      * @param       integer     $iCurrentObjectID
65 65
      */
66
-    function start_el( &$sOutput, $oTerm, $iDepth=0, $aArgs=array(), $iCurrentObjectID=0 ) {
66
+    function start_el( &$sOutput, $oTerm, $iDepth = 0, $aArgs = array(), $iCurrentObjectID = 0 ) {
67 67
        
68 68
         $aArgs = $aArgs + array(
69 69
             '_name_prefix'      => null,
70 70
             '_input_id_prefix'  => null,
71 71
             '_attributes'       => array(),
72 72
             '_selected_items'   => array(),
73
-            'taxonomy'          => null,    // parsed by the core function to perform the database query.
74
-            'disabled'          => null,    // not sure what this was for
75
-            '_save_unchecked'   => true,    // 3.8.8+
73
+            'taxonomy'          => null, // parsed by the core function to perform the database query.
74
+            'disabled'          => null, // not sure what this was for
75
+            '_save_unchecked'   => true, // 3.8.8+
76 76
         );
77 77
         
78 78
         // Local variables
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         // Post count
86 86
         $_sPostCount     = $aArgs[ 'show_post_count' ] 
87
-            ? " <span class='font-lighter'>(" . $oTerm->count . ")</span>" 
87
+            ? " <span class='font-lighter'>(".$oTerm->count.")</span>" 
88 88
             : '';
89 89
         
90 90
         // Attributes
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
           + array(
104 104
             'class'     => null,
105 105
         );
106
-        $_aInputAttributes['class'] .= ' apf_checkbox';
106
+        $_aInputAttributes[ 'class' ] .= ' apf_checkbox';
107 107
         
108 108
         $_aLiTagAttributes = array(
109 109
             'id'        => "list-{$_sID}",
@@ -112,15 +112,15 @@  discard block
 block discarded – undo
112 112
         );
113 113
 
114 114
         $_sHiddenInputForUnchecked = $aArgs[ '_save_unchecked' ]
115
-            ? "<input value='0' type='hidden' name='" . $_aInputAttributes[ 'name' ] . "' class='apf_checkbox' />"
115
+            ? "<input value='0' type='hidden' name='".$_aInputAttributes[ 'name' ]."' class='apf_checkbox' />"
116 116
             : '';
117 117
             
118 118
         // Output - the variable is by reference so the modification takes effect
119 119
         $sOutput .= "\n"
120
-            . "<li " . AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ) . ">" 
120
+            . "<li ".AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ).">" 
121 121
                 . "<label for='{$_sID}' class='taxonomy-checklist-label'>"
122 122
                     . $_sHiddenInputForUnchecked    // 3.8.8+
123
-                    . "<input " . AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes ) . " />"
123
+                    . "<input ".AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes )." />"
124 124
                     . esc_html( apply_filters( 'the_category', $oTerm->name ) ) 
125 125
                     . $_sPostCount
126 126
                 . "</label>";    
Please login to merge, or discard this patch.
factory/_common/form/field_type/AdminPageFramework_FieldType_posttype.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     /**
82 82
      * Defines the field type slugs used for this field type.
83 83
      */
84
-    public $aFieldTypeSlugs = array( 'posttype', );
84
+    public $aFieldTypeSlugs = array( 'posttype',);
85 85
     
86 86
     /**
87 87
      * Defines the default key-values of this field type. 
@@ -89,20 +89,20 @@  discard block
 block discarded – undo
89 89
      * @remark $_aDefaultKeys holds shared default key-values defined in the base class.
90 90
      */
91 91
     protected $aDefaultKeys = array(
92
-        'slugs_to_remove'       => null,    // the default array will be assigned in the rendering method.
92
+        'slugs_to_remove'       => null, // the default array will be assigned in the rendering method.
93 93
         /** 
94 94
          * Accepts query arguments. For the argument specification, see the arg parameter of get_post_types() function.
95 95
          * See: http://codex.wordpress.org/Function_Reference/get_post_types#Parameters
96 96
          */
97
-        'query'                 => array(),  // 3.2.1+
98
-        'operator'              => 'and',    // 3.2.1+ either 'and' or 'or'
97
+        'query'                 => array(), // 3.2.1+
98
+        'operator'              => 'and', // 3.2.1+ either 'and' or 'or'
99 99
         'attributes'            => array(
100 100
             'size'      => 30,
101 101
             'maxlength' => 400,
102 102
         ),    
103
-        'select_all_button'     => true,     // 3.3.0+   to change the label, set the label here
104
-        'select_none_button'    => true,     // 3.3.0+   to change the label, set the label here        
105
-        'save_unchecked'        => true,     // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
103
+        'select_all_button'     => true, // 3.3.0+   to change the label, set the label here
104
+        'select_none_button'    => true, // 3.3.0+   to change the label, set the label here        
105
+        'save_unchecked'        => true, // (optional, boolean) 3.8.8+   Whether to store the values of unchecked items.
106 106
     );
107 107
     protected $aDefaultRemovingPostTypeSlugs = array(
108 108
         'revision', 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */ 
120 120
     protected function getStyles() {
121 121
         $_sParentStyles = parent::getStyles();
122
-        return $_sParentStyles . <<<CSSRULES
122
+        return $_sParentStyles.<<<CSSRULES
123 123
 /* Posttype Field Type */
124 124
 .admin-page-framework-field input[type='checkbox'] {
125 125
     margin-right: 0.5em;
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
      */
147 147
     protected function getField( $aField ) {
148 148
 
149
-        $this->_sCheckboxClassSelector = '';    // disable the checkbox class selector.
149
+        $this->_sCheckboxClassSelector = ''; // disable the checkbox class selector.
150 150
         $aField[ 'label' ] = $this->_getPostTypeArrayForChecklist( 
151 151
             isset( $aField[ 'slugs_to_remove' ] ) 
152 152
                 ? $this->getAsArray( $aField[ 'slugs_to_remove' ] ) 
153
-                : $this->aDefaultRemovingPostTypeSlugs,    // slugs to remove
153
+                : $this->aDefaultRemovingPostTypeSlugs, // slugs to remove
154 154
             $aField[ 'query' ],
155 155
             $aField[ 'operator' ]
156 156
         );
@@ -171,11 +171,11 @@  discard block
 block discarded – undo
171 171
          * @return  array   The array holding the elements of installed post types' labels and their slugs except the specified expluding post types.
172 172
          * @internal
173 173
          */ 
174
-        private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs=array(), $sOperator='and' ) {
174
+        private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs = array(), $sOperator = 'and' ) {
175 175
             
176 176
             $_aPostTypes = array();
177
-            foreach( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) {
178
-                if (  isset( $_oPostType->name, $_oPostType->label ) ) {
177
+            foreach ( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) {
178
+                if ( isset( $_oPostType->name, $_oPostType->label ) ) {
179 179
                     $_aPostTypes[ $_oPostType->name ] = $_oPostType->label;
180 180
                 }
181 181
             }
Please login to merge, or discard this patch.