Completed
Branch master (a559c4)
by
unknown
05:07
created
include/class/event/AdminPageFrameworkLoader_Event.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     public function __construct() {
25 25
         
26 26
         new AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion(
27
-            AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_action_get_development_version'  // action name
27
+            AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_action_get_development_version'  // action name
28 28
         );
29 29
                 
30 30
     }
Please login to merge, or discard this patch.
class/event/AdminPageFrameworkLoader_Event_Action_GetDevelopmentVersion.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function replyToDoAction() {
41 41
         AdminPageFramework_WPUtility::setTransient(
42
-            AdminPageFrameworkLoader_Registry::TRANSIENT_PREFIX . 'devver',
42
+            AdminPageFrameworkLoader_Registry::TRANSIENT_PREFIX.'devver',
43 43
             $this->_getVersion(), // data - if an error occurs, an empty string will be given
44 44
             604800 // for one week
45 45
         );        
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             $_sPageBody = $this->_getPageBody();
56 56
             $_aHeaders  = $_oUtil->getScriptData( 
57 57
                 $_sPageBody, 
58
-                '',  /// context
58
+                '', /// context
59 59
                 array( 'version' => 'Version' ) 
60 60
             );
61 61
             return $_oUtil->getElement(
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      * 
27 27
      * @since       3.6.2
28 28
      */
29
-    public function __construct( $sActionName ) {  
29
+    public function __construct( $sActionName ) {
30 30
         add_action(
31 31
             $sActionName,
32 32
             array( $this, 'replyToDoAction' )
Please login to merge, or discard this patch.
include/class/utility/AdminPageFrameworkLoader_FeedList.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * 
48 48
      * @return      array
49 49
      */
50
-    public function get( $iItems=0 ) {
50
+    public function get( $iItems = 0 ) {
51 51
         
52 52
         $_aOutput   = array();
53 53
         $_aURLs     = $this->_aURLs;
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             return $_aOutput;
57 57
         }
58 58
                                  
59
-        $_oFeed     = fetch_feed( $_aURLs );
59
+        $_oFeed = fetch_feed( $_aURLs );
60 60
         foreach ( $_oFeed->get_items() as $_oItem ) {
61 61
             $_aOutput[ $_oItem->get_title() ] = array( 
62 62
                 'content'        => $_oItem->get_content(),
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                 'title'          => $_oItem->get_title(),
65 65
                 'date'           => $_oItem->get_date( 'j F Y, g:i a' ),
66 66
                 'author'         => $_oItem->get_author(),
67
-                'link'           => $_oItem->get_permalink(),    // get_link() may be used as well        
67
+                'link'           => $_oItem->get_permalink(), // get_link() may be used as well        
68 68
             );
69 69
         }
70 70
 
Please login to merge, or discard this patch.
uninstall.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
  */
31 31
 $_sMaingPluginFileName  = 'admin-page-framework-loader.php';
32 32
 if ( file_exists( dirname( __FILE__ ). '/' . $_sMaingPluginFileName ) ) {
33
-   include( $_sMaingPluginFileName );
33
+    include( $_sMaingPluginFileName );
34 34
 }
35 35
 
36 36
 if ( class_exists( 'AdminPageFrameworkLoader_Registry' ) ) :
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@  discard block
 block discarded – undo
9 9
  * @since        3.5.0
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( !defined( 'ABSPATH' ) ) {
13 13
     exit;
14 14
 }
15
-if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
15
+if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
16 16
     exit;
17 17
 }
18 18
 
@@ -21,15 +21,15 @@  discard block
 block discarded – undo
21 21
  * We are going to load the main file to get the registry class. And in the main file, 
22 22
  * if this constant is set, it will return after declaring the registry class.
23 23
  **/
24
-if ( ! defined( 'DOING_UNINSTALL' ) ) {
25
-    define( 'DOING_UNINSTALL', true  );
24
+if ( !defined( 'DOING_UNINSTALL' ) ) {
25
+    define( 'DOING_UNINSTALL', true );
26 26
 }
27 27
 
28 28
 /**
29 29
  * Set the main plugin file name here.
30 30
  */
31
-$_sMaingPluginFileName  = 'admin-page-framework-loader.php';
32
-if ( file_exists( dirname( __FILE__ ). '/' . $_sMaingPluginFileName ) ) {
31
+$_sMaingPluginFileName = 'admin-page-framework-loader.php';
32
+if ( file_exists( dirname( __FILE__ ).'/'.$_sMaingPluginFileName ) ) {
33 33
    include( $_sMaingPluginFileName );
34 34
 }
35 35
 
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
     // Delete transients
42 42
     $_aPrefixes = array(
43 43
         AdminPageFrameworkLoader_Registry::TRANSIENT_PREFIX, // the plugin transients
44
-        'apf_',      // the admin page framework transients
44
+        'apf_', // the admin page framework transients
45 45
     );
46
-    foreach( $_aPrefixes as $_sPrefix ) {
47
-        if ( ! $_sPrefix ) { continue; }
48
-        $GLOBALS['wpdb']->query( "DELETE FROM `" . $GLOBALS['table_prefix'] . "options` WHERE `option_name` LIKE ( '_transient_%{$_sPrefix}%' )" );
49
-        $GLOBALS['wpdb']->query( "DELETE FROM `" . $GLOBALS['table_prefix'] . "options` WHERE `option_name` LIKE ( '_transient_timeout_%{$_sPrefix}%' )" );    
46
+    foreach ( $_aPrefixes as $_sPrefix ) {
47
+        if ( !$_sPrefix ) { continue; }
48
+        $GLOBALS[ 'wpdb' ]->query( "DELETE FROM `".$GLOBALS[ 'table_prefix' ]."options` WHERE `option_name` LIKE ( '_transient_%{$_sPrefix}%' )" );
49
+        $GLOBALS[ 'wpdb' ]->query( "DELETE FROM `".$GLOBALS[ 'table_prefix' ]."options` WHERE `option_name` LIKE ( '_transient_timeout_%{$_sPrefix}%' )" );    
50 50
     }
51 51
     
52 52
 endif;
53 53
\ No newline at end of file
Please login to merge, or discard this patch.
factory/_abstract/controller/AdminPageFramework_Resource_Base.php 4 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -232,6 +232,8 @@  discard block
 block discarded – undo
232 232
      * @remark      The meta box class may be instantiated multiple times so prevent echoing the same styles multiple times.
233 233
      * @parameter   string      $sIDPrefix   The id selector embedded in the script tag.
234 234
      * @parameter   string      $sClassName  The class name that identify the call group. This is important for the meta-box class because it can be instantiated multiple times in one particular page.
235
+     * @param string $sIDPrefix
236
+     * @param string $sClassName
235 237
      */
236 238
     protected function _printCommonStyles( $sIDPrefix, $sClassName ) {
237 239
 
@@ -315,6 +317,8 @@  discard block
 block discarded – undo
315 317
      * @remark      The meta box class may be instantiated multiple times so prevent echoing the same styles multiple times.
316 318
      * @parametr    string      $sIDPrefix      The id selector embedded in the script tag.
317 319
      * @parametr    string      $sClassName     The class name that identify the call group. This is important for the meta-box class because it can be instantiated multiple times in one particular page.
320
+     * @param string $sIDPrefix
321
+     * @param string $sClassName
318 322
      */
319 323
     protected function _printCommonScripts( $sIDPrefix, $sClassName ) {
320 324
         
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         return "{$_aField['field_id']}{$_sKey}";
70 70
     }
71 71
 
72
-   /**
72
+    /**
73 73
      * Adds input fields
74 74
      * 
75 75
      * @internal
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -36,19 +36,19 @@  discard block
 block discarded – undo
36 36
     
37 37
         /* The system internal keys. */
38 38
         'sSRC'          => null,
39
-        'aPostTypes'    => array(),     // for meta box class
39
+        'aPostTypes'    => array(), // for meta box class
40 40
         'sPageSlug'     => null,    
41 41
         'sTabSlug'      => null,
42
-        'sType'         => null,        // script or style
42
+        'sType'         => null, // script or style
43 43
         
44 44
         /* The below keys are for users. */
45 45
         'handle_id'     => null,
46 46
         'dependencies'  => array(),
47
-        'version'       => false,       // although the type should be string, the wp_enqueue_...() functions want false as the default value.
48
-        'translation'   => array(),     // only for scripts
49
-        'in_footer'     => false,       // only for scripts
50
-        'media'         => 'all',       // only for styles     
51
-        'attributes'    => array(),     // 3.3.0+ - the attribute array
47
+        'version'       => false, // although the type should be string, the wp_enqueue_...() functions want false as the default value.
48
+        'translation'   => array(), // only for scripts
49
+        'in_footer'     => false, // only for scripts
50
+        'media'         => 'all', // only for styles     
51
+        'attributes'    => array(), // 3.3.0+ - the attribute array
52 52
         
53 53
     );    
54 54
       
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @remark      This value should be overridden in an extended class.
60 60
      * @internal
61 61
      */
62
-    protected $_sClassSelector_Style    = 'admin-page-framework-style';
62
+    protected $_sClassSelector_Style = 'admin-page-framework-style';
63 63
     
64 64
     /**
65 65
      * Stores the class selector used to the class-specific script.
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @remark      This value should be overridden in an extended class.
69 69
      * @internal
70 70
      */    
71
-    protected $_sClassSelector_Script   = 'admin-page-framework-script';
71
+    protected $_sClassSelector_Script = 'admin-page-framework-script';
72 72
       
73 73
     /**
74 74
      * Stores hand IDs by resource url to look up handle id and add custom arguments.
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
      * @internal
143 143
      */
144 144
     
145
-    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs=array() ) {}
146
-    public function _forceToEnqueueScript( $sSRC, $aCustomArgs=array() ) {}
145
+    public function _forceToEnqueueStyle( $sSRC, $aCustomArgs = array() ) {}
146
+    public function _forceToEnqueueScript( $sSRC, $aCustomArgs = array() ) {}
147 147
     
148 148
     /**
149 149
      * A helper function for the _replyToEnqueueScripts() and the `_replyToEnqueueStyle()` methods.
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
                     }
202 202
                     
203 203
                     $_sAttributes   = $this->getAttributes( $_aAttributes );
204
-                    $_sModifiedURL  = $sSanitizedURL . "' " . rtrim( $_sAttributes, "'\"" );    // '"
204
+                    $_sModifiedURL  = $sSanitizedURL."' ".rtrim( $_sAttributes, "'\"" ); // '"
205 205
 
206 206
                     return $_sModifiedURL;                    
207 207
                     
@@ -249,19 +249,19 @@  discard block
 block discarded – undo
249 249
          */
250 250
         private function _getStyleTag( $oCaller, $sIDPrefix ) {
251 251
             
252
-            $_sStyle     = $this->addAndApplyFilters( 
252
+            $_sStyle = $this->addAndApplyFilters( 
253 253
                 $oCaller, 
254 254
                 array(
255
-                    "style_common_admin_page_framework",            // 3.2.1+
255
+                    "style_common_admin_page_framework", // 3.2.1+
256 256
                     "style_common_{$this->oProp->sClassName}",
257 257
                 ), 
258 258
                 AdminPageFramework_CSS::getDefaultCSS() 
259 259
             );
260
-            $_sStyle     = $this->isDebugMode()
260
+            $_sStyle = $this->isDebugMode()
261 261
                 ? trim( $_sStyle )
262 262
                 : $this->minifyCSS( $_sStyle );
263 263
             if ( $_sStyle ) {
264
-                echo "<style type='text/css' id='" . esc_attr( $sIDPrefix ) . "'>"
264
+                echo "<style type='text/css' id='".esc_attr( $sIDPrefix )."'>"
265 265
                         . $_sStyle
266 266
                     . "</style>";
267 267
             }
@@ -275,20 +275,20 @@  discard block
 block discarded – undo
275 275
          */        
276 276
         private function _getIEStyleTag( $oCaller, $sIDPrefix ) {
277 277
                 
278
-            $_sStyleIE   = $this->addAndApplyFilters( 
278
+            $_sStyleIE = $this->addAndApplyFilters( 
279 279
                 $oCaller, 
280 280
                 array(
281
-                    "style_ie_common_admin_page_framework",         // 3.2.1+
281
+                    "style_ie_common_admin_page_framework", // 3.2.1+
282 282
                     "style_ie_common_{$this->oProp->sClassName}", 
283 283
                 ),
284 284
                 AdminPageFramework_CSS::getDefaultCSSIE() 
285 285
             );
286 286
             
287
-            $_sStyleIE   = $this->isDebugMode()
287
+            $_sStyleIE = $this->isDebugMode()
288 288
                 ? trim( $_sStyleIE )
289 289
                 : $this->minifyCSS( $_sStyleIE );
290 290
             return $_sStyleIE
291
-                ? "<!--[if IE]><style type='text/css' id='" . esc_attr( $sIDPrefix . "-ie" ) . "'>"
291
+                ? "<!--[if IE]><style type='text/css' id='".esc_attr( $sIDPrefix."-ie" )."'>"
292 292
                         . $_sStyleIE
293 293
                     . "</style><![endif]-->"
294 294
                 : '';
@@ -321,13 +321,13 @@  discard block
 block discarded – undo
321 321
         $_sScript = $this->addAndApplyFilters( 
322 322
             $this->oProp->_getCallerObject(), 
323 323
             array(
324
-                "script_common_admin_page_framework",       // 3.2.1+
324
+                "script_common_admin_page_framework", // 3.2.1+
325 325
                 "script_common_{$this->oProp->sClassName}", 
326 326
             ),
327 327
             AdminPageFramework_Property_Base::$_sDefaultScript 
328 328
         );
329 329
         if ( $_sScript ) {
330
-            echo "<script type='text/javascript' id='" . esc_attr( $sIDPrefix ) . "'>"
330
+            echo "<script type='text/javascript' id='".esc_attr( $sIDPrefix )."'>"
331 331
                     . $_sScript
332 332
                 . "</script>";
333 333
         }
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
      */
345 345
     protected function _printClassSpecificStyles( $sIDPrefix ) {
346 346
            
347
-        $_oCaller   = $this->oProp->_getCallerObject();     
347
+        $_oCaller = $this->oProp->_getCallerObject();     
348 348
         echo $this->_getClassSpecificStyleTag( $_oCaller, $sIDPrefix );
349 349
         echo $this->_getClassSpecificIEStyleTag( $_oCaller, $sIDPrefix );
350 350
         
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
                 ? trim( $_sStyle )
373 373
                 : $this->minifyCSS( $_sStyle );
374 374
             if ( $_sStyle ) {
375
-                return "<style type='text/css' id='" . esc_attr( "{$sIDPrefix}-{$this->oProp->sClassName}_{$_iCallCount}" ) . "'>"
375
+                return "<style type='text/css' id='".esc_attr( "{$sIDPrefix}-{$this->oProp->sClassName}_{$_iCallCount}" )."'>"
376 376
                         . $_sStyle
377 377
                     . "</style>";
378 378
                 $_iCallCount++;
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
                 ? trim( $_sStyleIE )
399 399
                 : $this->minifyCSS( $_sStyleIE );
400 400
             if ( $_sStyleIE ) {
401
-                return "<!--[if IE]><style type='text/css' id='" . esc_attr( "{$sIDPrefix}-ie-{$this->oProp->sClassName}_{$_iCallCountIE}" ) . "'>" 
401
+                return "<!--[if IE]><style type='text/css' id='".esc_attr( "{$sIDPrefix}-ie-{$this->oProp->sClassName}_{$_iCallCountIE}" )."'>" 
402 402
                         . $_sStyleIE
403 403
                     . "</style><![endif]-->";
404 404
                 $_iCallCountIE++;
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
             $this->oProp->sScript 
426 426
         );
427 427
         if ( $_sScript ) {
428
-            echo "<script type='text/javascript' id='" . esc_attr( "{$sIDPrefix}-{$this->oProp->sClassName}_{$_iCallCount}" ) . "'>" 
428
+            echo "<script type='text/javascript' id='".esc_attr( "{$sIDPrefix}-{$this->oProp->sClassName}_{$_iCallCount}" )."'>" 
429 429
                     . $_sScript
430 430
                 . "</script>"; 
431 431
             $_iCallCount++;
@@ -449,10 +449,10 @@  discard block
 block discarded – undo
449 449
     public function _replyToAddStyle() {
450 450
     
451 451
         $_oCaller = $this->oProp->_getCallerObject();     
452
-        if ( ! $_oCaller->_isInThePage() ) { return; }
452
+        if ( !$_oCaller->_isInThePage() ) { return; }
453 453
         
454 454
         $this->_printCommonStyles( 'admin-page-framework-style-common', get_class() );
455
-        $this->_printClassSpecificStyles( $this->_sClassSelector_Style . '-' . $this->oProp->sFieldsType );
455
+        $this->_printClassSpecificStyles( $this->_sClassSelector_Style.'-'.$this->oProp->sFieldsType );
456 456
  
457 457
     }
458 458
     /**
@@ -467,10 +467,10 @@  discard block
 block discarded – undo
467 467
     public function _replyToAddScript() {
468 468
 
469 469
         $_oCaller = $this->oProp->_getCallerObject();     
470
-        if ( ! $_oCaller->_isInThePage() ) { return; }
470
+        if ( !$_oCaller->_isInThePage() ) { return; }
471 471
         
472 472
         $this->_printCommonScripts( 'admin-page-framework-script-common', get_class() );
473
-        $this->_printClassSpecificScripts( $this->_sClassSelector_Script . '-' . $this->oProp->sFieldsType );
473
+        $this->_printClassSpecificScripts( $this->_sClassSelector_Script.'-'.$this->oProp->sFieldsType );
474 474
         
475 475
     }        
476 476
     
@@ -485,28 +485,28 @@  discard block
 block discarded – undo
485 485
     protected function _enqueueSRC( $aEnqueueItem ) {
486 486
         
487 487
         // For styles
488
-        if ( 'style' === $aEnqueueItem['sType'] ) {
488
+        if ( 'style' === $aEnqueueItem[ 'sType' ] ) {
489 489
             wp_enqueue_style( 
490
-                $aEnqueueItem['handle_id'], 
491
-                $aEnqueueItem['sSRC'], 
492
-                $aEnqueueItem['dependencies'], 
493
-                $aEnqueueItem['version'], 
494
-                $aEnqueueItem['media']
490
+                $aEnqueueItem[ 'handle_id' ], 
491
+                $aEnqueueItem[ 'sSRC' ], 
492
+                $aEnqueueItem[ 'dependencies' ], 
493
+                $aEnqueueItem[ 'version' ], 
494
+                $aEnqueueItem[ 'media' ]
495 495
             );
496 496
             return;
497 497
         }
498 498
 
499 499
         // For scripts
500 500
         wp_enqueue_script( 
501
-            $aEnqueueItem['handle_id'], 
502
-            $aEnqueueItem['sSRC'], 
503
-            $aEnqueueItem['dependencies'], 
504
-            $aEnqueueItem['version'], 
505
-            did_action( 'admin_body_class' ) ? true : $aEnqueueItem['in_footer'] 
501
+            $aEnqueueItem[ 'handle_id' ], 
502
+            $aEnqueueItem[ 'sSRC' ], 
503
+            $aEnqueueItem[ 'dependencies' ], 
504
+            $aEnqueueItem[ 'version' ], 
505
+            did_action( 'admin_body_class' ) ? true : $aEnqueueItem[ 'in_footer' ] 
506 506
         );
507 507
     
508
-        if ( $aEnqueueItem['translation'] ) {
509
-            wp_localize_script( $aEnqueueItem['handle_id'], $aEnqueueItem['handle_id'], $aEnqueueItem['translation'] );
508
+        if ( $aEnqueueItem[ 'translation' ] ) {
509
+            wp_localize_script( $aEnqueueItem[ 'handle_id' ], $aEnqueueItem[ 'handle_id' ], $aEnqueueItem[ 'translation' ] );
510 510
         }
511 511
         
512 512
     }
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
      * @internal
523 523
      */    
524 524
     public function _replyToEnqueueStyles() {        
525
-        foreach( $this->oProp->aEnqueuingStyles as $_sKey => $_aEnqueuingStyle ) {
525
+        foreach ( $this->oProp->aEnqueuingStyles as $_sKey => $_aEnqueuingStyle ) {
526 526
             $this->_enqueueSRCByConditoin( $_aEnqueuingStyle );
527 527
             unset( $this->oProp->aEnqueuingStyles[ $_sKey ] );
528 528
         }
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
      * @internal
540 540
      */
541 541
     public function _replyToEnqueueScripts() {     
542
-        foreach( $this->oProp->aEnqueuingScripts as $_sKey => $_aEnqueuingScript ) {
542
+        foreach ( $this->oProp->aEnqueuingScripts as $_sKey => $_aEnqueuingScript ) {
543 543
             $this->_enqueueSRCByConditoin( $_aEnqueuingScript );     
544 544
             unset( $this->oProp->aEnqueuingScripts[ $_sKey ] );
545 545
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      */
233 233
     protected function _printCommonStyles( $sIDPrefix, $sClassName ) {
234 234
                 
235
-        if ( self::$_bCommonStyleLoaded ) { 
235
+        if ( self::$_bCommonStyleLoaded ) {
236 236
             return; 
237 237
         }
238 238
         self::$_bCommonStyleLoaded = true;
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
      * @since       3.2.0   Changed it unset the enqueued item so that the method can be called multiple times.
522 522
      * @internal
523 523
      */    
524
-    public function _replyToEnqueueStyles() {        
524
+    public function _replyToEnqueueStyles() {
525 525
         foreach( $this->oProp->aEnqueuingStyles as $_sKey => $_aEnqueuingStyle ) {
526 526
             $this->_enqueueSRCByConditoin( $_aEnqueuingStyle );
527 527
             unset( $this->oProp->aEnqueuingStyles[ $_sKey ] );
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
      * @since       3.2.0   Changed it unset the enqueued item so that the method can be called multiple times.
539 539
      * @internal
540 540
      */
541
-    public function _replyToEnqueueScripts() {     
541
+    public function _replyToEnqueueScripts() {
542 542
         foreach( $this->oProp->aEnqueuingScripts as $_sKey => $_aEnqueuingScript ) {
543 543
             $this->_enqueueSRCByConditoin( $_aEnqueuingScript );     
544 544
             unset( $this->oProp->aEnqueuingScripts[ $_sKey ] );
Please login to merge, or discard this patch.
_abstract/model/form_definition/AdminPageFramework_FormDefinition_Meta.php 4 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -173,6 +173,7 @@
 block discarded – undo
173 173
          * 
174 174
          * @internal
175 175
          * @since       3.5.3
176
+         * @param integer $iObjectID
176 177
          * @return      void
177 178
          */
178 179
         private function _updateMetaDatumByFuncitonName( $iObjectID, $_vValue, array $aSavedMeta, $_sSectionOrFieldID, $_sFunctionName ) {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
                 
85 85
                 // The first element is the option key; the section or field dimensional keys follow.
86 86
                 if ( '__dummy_option_key' === $_aDimensionalKeys[ 0 ] ) {
87
-                     array_shift( $_aDimensionalKeys );
87
+                        array_shift( $_aDimensionalKeys );
88 88
                 }
89 89
                 
90 90
                 $this->unsetDimensionalArrayElement( 
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
 
33 33
         // Construct an array consisting of the submitted registered field values.
34 34
         $_aInput = array();
35
-        foreach( $aFieldDefinitionArrays as $_sSectionID => $_aSubSectionsOrFields ) {
35
+        foreach ( $aFieldDefinitionArrays as $_sSectionID => $_aSubSectionsOrFields ) {
36 36
             
37 37
             // If a section is not set,
38 38
             if ( '_default' == $_sSectionID ) {
39 39
                 $_aFields = $_aSubSectionsOrFields;
40
-                foreach( $_aFields as $_aField ) {
41
-                    $_aInput[ $_aField['field_id'] ] = $this->getElement(
40
+                foreach ( $_aFields as $_aField ) {
41
+                    $_aInput[ $_aField[ 'field_id' ] ] = $this->getElement(
42 42
                         $_POST, // subject
43
-                        $_aField['field_id'],    // dimensional keys
43
+                        $_aField[ 'field_id' ], // dimensional keys
44 44
                         null   // default value
45 45
                     );                            
46 46
                 }
@@ -50,18 +50,18 @@  discard block
 block discarded – undo
50 50
             // At this point, the section is set
51 51
             $_aInput[ $_sSectionID ] = $this->getElementAsArray(
52 52
                 $_aInput, // subjct
53
-                $_sSectionID,    // dimensional keys
53
+                $_sSectionID, // dimensional keys
54 54
                 array()   // default value
55 55
             );      
56 56
             
57 57
             // If the section does not contain sub sections,
58
-            if ( ! count( $this->getIntegerKeyElements( $_aSubSectionsOrFields ) ) ) {
58
+            if ( !count( $this->getIntegerKeyElements( $_aSubSectionsOrFields ) ) ) {
59 59
                 
60 60
                 $_aFields = $_aSubSectionsOrFields;
61
-                foreach( $_aFields as $_aField ) {
62
-                    $_aInput[ $_sSectionID ][ $_aField['field_id'] ] = $this->getElement(
61
+                foreach ( $_aFields as $_aField ) {
62
+                    $_aInput[ $_sSectionID ][ $_aField[ 'field_id' ] ] = $this->getElement(
63 63
                         $_POST, // subjct
64
-                        array( $_sSectionID, $_aField['field_id'] ),    // dimensional keys
64
+                        array( $_sSectionID, $_aField[ 'field_id' ] ), // dimensional keys
65 65
                         null   // default value
66 66
                     );
67 67
                 }
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
                 
72 72
             // Otherwise, it's sub-sections. 
73 73
             // Since the registered fields don't have information how many items the user added, parse the submitted data.
74
-            foreach( $_POST[ $_sSectionID ] as $_iIndex => $_aFields ) { // will include the main section as well.
74
+            foreach ( $_POST[ $_sSectionID ] as $_iIndex => $_aFields ) { // will include the main section as well.
75 75
                 $_aInput[ $_sSectionID ][ $_iIndex ] = $this->getElement(
76 76
                     $_POST, // subjct
77
-                    array( $_sSectionID, $_iIndex ),    // dimensional keys
77
+                    array( $_sSectionID, $_iIndex ), // dimensional keys
78 78
                     null   // default value
79 79
                 );
80 80
             }        
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
      * @param       string      $sFieldsType    The type of object. Currently 'post_meta_box' or 'user_meta' is accepted.
98 98
      * @return      void
99 99
      */
100
-    public function updateMetaDataByType( $iObjectID, array $aInput, array $aSavedMeta, $sFieldsType='post_meta_box' ) {
100
+    public function updateMetaDataByType( $iObjectID, array $aInput, array $aSavedMeta, $sFieldsType = 'post_meta_box' ) {
101 101
         
102
-        if ( ! $iObjectID ) {
102
+        if ( !$iObjectID ) {
103 103
             return;
104 104
         }
105 105
            
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             // 'widget'            => null,
112 112
             'user_meta'         => 'update_user_meta',               
113 113
         );
114
-        if ( ! in_array( $sFieldsType, array_keys( $_aFunctionNameMapByFieldsType ) ) ) {
114
+        if ( !in_array( $sFieldsType, array_keys( $_aFunctionNameMapByFieldsType ) ) ) {
115 115
             return;
116 116
         }
117 117
         $_sFunctionName = $this->getElement( $_aFunctionNameMapByFieldsType, $sFieldsType );
@@ -140,16 +140,16 @@  discard block
 block discarded – undo
140 140
          */
141 141
         private function _getInputByUnset( array $aInput ) {
142 142
             
143
-            $_sUnsetKey = '__unset_' . $this->sFieldsType;
144
-            if ( ! isset( $_POST[ $_sUnsetKey ] ) ) {
143
+            $_sUnsetKey = '__unset_'.$this->sFieldsType;
144
+            if ( !isset( $_POST[ $_sUnsetKey ] ) ) {
145 145
                 return $aInput;
146 146
             }
147 147
             
148 148
             $_aUnsetElements = array_unique( $_POST[ $_sUnsetKey ] );
149
-            foreach( $_aUnsetElements as $_sFlatInputName ) {
149
+            foreach ( $_aUnsetElements as $_sFlatInputName ) {
150 150
                 
151 151
                 $_aDimensionalKeys = explode( '|', $_sFlatInputName );
152
-                if ( ! isset( $_aDimensionalKeys[ 0 ] ) ) {
152
+                if ( !isset( $_aDimensionalKeys[ 0 ] ) ) {
153 153
                     continue;
154 154
                 }
155 155
                 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
             $_vSavedValue = $this->getElement(
185 185
                 $aSavedMeta, // subject
186
-                $_sSectionOrFieldID,    // dimensional keys
186
+                $_sSectionOrFieldID, // dimensional keys
187 187
                 null   // default value
188 188
             );
189 189
                 
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,8 @@  discard block
 block discarded – undo
71 71
                 
72 72
             // Otherwise, it's sub-sections. 
73 73
             // Since the registered fields don't have information how many items the user added, parse the submitted data.
74
-            foreach( $_POST[ $_sSectionID ] as $_iIndex => $_aFields ) { // will include the main section as well.
74
+            foreach( $_POST[ $_sSectionID ] as $_iIndex => $_aFields ) {
75
+// will include the main section as well.
75 76
                 $_aInput[ $_sSectionID ][ $_iIndex ] = $this->getElement(
76 77
                     $_POST, // subjct
77 78
                     array( $_sSectionID, $_iIndex ),    // dimensional keys
@@ -177,7 +178,7 @@  discard block
 block discarded – undo
177 178
          */
178 179
         private function _updateMetaDatumByFuncitonName( $iObjectID, $_vValue, array $aSavedMeta, $_sSectionOrFieldID, $_sFunctionName ) {
179 180
             
180
-            if ( is_null( $_vValue ) ) { 
181
+            if ( is_null( $_vValue ) ) {
181 182
                 return;
182 183
             }
183 184
 
@@ -189,7 +190,7 @@  discard block
 block discarded – undo
189 190
                 
190 191
             // PHP can compare even array contents with the == operator. See http://www.php.net/manual/en/language.operators.array.php
191 192
             // if the input value and the saved meta value are the same, no need to update it.
192
-            if ( $_vValue == $_vSavedValue ) { 
193
+            if ( $_vValue == $_vSavedValue ) {
193 194
                 return; 
194 195
             }
195 196
             
Please login to merge, or discard this patch.
_abstract/model/format/AdminPageFramework_Format_CollapsibleSection.php 3 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -77,6 +77,8 @@
 block discarded – undo
77 77
     }
78 78
         /**
79 79
          * @since       3.6.0
80
+         * @param boolean $abCollapsible
81
+         * @param string $sTitle
80 82
          * @return      array
81 83
          */
82 84
         private function _getArguments( $abCollapsible, $sTitle, array $aSection ) {
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
      * @since       3.6.0       Moved from `AdminPageFramework_FormDefinition`.
24 24
      */
25 25
     static public $aStructure = array(
26
-        'title'                     => null,        // (string)  the section title will be assigned by default in the section formatting method.
27
-        'is_collapsed'              => true,        // (boolean) whether it is already collapsed or expanded
28
-        'toggle_all_button'         => null,        // (boolean|string|array) the position of where to display the toggle-all button that toggles the folding state of all collapsible sections. Accepts the following values. 'top-right', 'top-left', 'bottom-right', 'bottom-left'. If true is passed, the default 'top-right' will be used. To not to display, do not set any or pass `false` or `null`.
29
-        'collapse_others_on_expand' => true,        // (boolean) whether the other collapsible sections should be folded when the section is unfolded.
26
+        'title'                     => null, // (string)  the section title will be assigned by default in the section formatting method.
27
+        'is_collapsed'              => true, // (boolean) whether it is already collapsed or expanded
28
+        'toggle_all_button'         => null, // (boolean|string|array) the position of where to display the toggle-all button that toggles the folding state of all collapsible sections. Accepts the following values. 'top-right', 'top-left', 'bottom-right', 'bottom-left'. If true is passed, the default 'top-right' will be used. To not to display, do not set any or pass `false` or `null`.
29
+        'collapse_others_on_expand' => true, // (boolean) whether the other collapsible sections should be folded when the section is unfolded.
30 30
         'container'                 => 'sections'   // (string) the container element that collapsible styling gets applied to. Either 'sections' or 'section' is accepted.
31 31
     );   
32 32
     
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      * @remark      The framework will not pass this parameter when formatting a section definition array.
41 41
      * It will be passed when the framework is rendering a form table to generate collapsible elements.
42 42
      */
43
-    public $aSection      = array();
43
+    public $aSection = array();
44 44
     
45 45
     /**
46 46
      * Sets up properties.
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
             
84 84
             $_aCollapsible = $this->getAsArray( $this->abCollapsible ) + array(
85 85
                 'title'     => $sTitle,
86
-            ) +  self::$aStructure;
86
+            ) + self::$aStructure;
87 87
             
88 88
             $_aCollapsible[ 'toggle_all_button' ] = implode( 
89 89
                 ',', 
90 90
                 $this->getAsArray( $_aCollapsible[ 'toggle_all_button' ] ) 
91 91
             );
92 92
             
93
-            if ( ! empty( $aSection ) ) {
93
+            if ( !empty( $aSection ) ) {
94 94
                 $_aCollapsible[ 'toggle_all_button' ] = $this->_getToggleAllButtonArgument( 
95 95
                     $_aCollapsible[ 'toggle_all_button' ], 
96 96
                     $aSection
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
              */
115 115
             private function _getToggleAllButtonArgument( $sToggleAll, array $aSection ) {
116 116
                 
117
-                if ( ! $aSection[ 'repeatable' ] ) {            
117
+                if ( !$aSection[ 'repeatable' ] ) {            
118 118
                     return $sToggleAll;
119 119
                 }
120 120
                 
@@ -124,13 +124,13 @@  discard block
 block discarded – undo
124 124
                 }
125 125
                 
126 126
                 // Disable the toggle all button for middle sub-sections in repeatable sections.
127
-                if ( ! $aSection[ '_is_first_index' ] && ! $aSection[ '_is_last_index' ] ) {
127
+                if ( !$aSection[ '_is_first_index' ] && !$aSection[ '_is_last_index' ] ) {
128 128
                     return 0;
129 129
                 }            
130 130
                 
131 131
                 $_aToggleAll = $this->getAOrB(
132
-                    true === $sToggleAll || 1 ===  $sToggleAll, // evaluate
133
-                    array( 'top-right', 'bottom-right' ),   // if true
132
+                    true === $sToggleAll || 1 === $sToggleAll, // evaluate
133
+                    array( 'top-right', 'bottom-right' ), // if true
134 134
                     explode( ',', $sToggleAll ) // if false
135 135
                 );            
136 136
                 $_aToggleAll = $this->getAOrB(
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
              */
115 115
             private function _getToggleAllButtonArgument( $sToggleAll, array $aSection ) {
116 116
                 
117
-                if ( ! $aSection[ 'repeatable' ] ) {            
117
+                if ( ! $aSection[ 'repeatable' ] ) {
118 118
                     return $sToggleAll;
119 119
                 }
120 120
                 
Please login to merge, or discard this patch.
development/factory/_abstract/view/AdminPageFramework_PageLoadInfo_Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
          * Converts bytes to HR.
110 110
          *
111 111
          * @access private
112
-         * @param mixed $bytes
112
+         * @param mixed $nBytes
113 113
          * @remark This is influenced by the work of Mike Jolley.
114 114
          * @see http://mikejolley.com/projects/wp-page-load-stats/
115 115
          */
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     
20 20
     function __construct( $oProp, $oMsg ) {
21 21
         
22
-        if ( $oProp->bIsAdminAjax || ! $oProp->bIsAdmin ) {
22
+        if ( $oProp->bIsAdminAjax || !$oProp->bIsAdmin ) {
23 23
             return;
24 24
         }     
25 25
         
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         self::$_bLoadedPageLoadInfo = true;     
59 59
         
60 60
         $_nSeconds                 = timer_stop( 0 );
61
-        $_nQueryCount             = get_num_queries();
61
+        $_nQueryCount = get_num_queries();
62 62
         $_nMemoryUsage             = round( $this->_convertBytesToHR( memory_get_usage() ), 2 );
63 63
         $_nMemoryPeakUsage         = round( $this->_convertBytesToHR( memory_get_peak_usage() ), 2 );
64 64
         $_nMemoryLimit             = round( $this->_convertBytesToHR( $this->_convertToNumber( WP_MEMORY_LIMIT ) ), 2 );
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
         return $sFooterHTML
68 68
             . "<div id='admin-page-framework-page-load-stats'>"
69 69
                 . "<ul>"
70
-                    . "<li>" . sprintf( $this->oMsg->get( 'queries_in_seconds' ), $_nQueryCount, $_nSeconds ) . "</li>"
71
-                    . "<li>" . sprintf( $this->oMsg->get( 'out_of_x_memory_used' ), $_nMemoryUsage, $_nMemoryLimit, round( ( $_nMemoryUsage / $_nMemoryLimit ), 2 ) * 100 . '%' ) . "</li>"
72
-                    . "<li>" . sprintf( $this->oMsg->get( 'peak_memory_usage' ), $_nMemoryPeakUsage ) . "</li>"
73
-                    . "<li>" . sprintf( $this->oMsg->get( 'initial_memory_usage' ), $_sInitialMemoryUsage ) . "</li>"
70
+                    . "<li>".sprintf( $this->oMsg->get( 'queries_in_seconds' ), $_nQueryCount, $_nSeconds )."</li>"
71
+                    . "<li>".sprintf( $this->oMsg->get( 'out_of_x_memory_used' ), $_nMemoryUsage, $_nMemoryLimit, round( ( $_nMemoryUsage / $_nMemoryLimit ), 2 ) * 100.'%' )."</li>"
72
+                    . "<li>".sprintf( $this->oMsg->get( 'peak_memory_usage' ), $_nMemoryPeakUsage )."</li>"
73
+                    . "<li>".sprintf( $this->oMsg->get( 'initial_memory_usage' ), $_sInitialMemoryUsage )."</li>"
74 74
                 . "</ul>"
75 75
             . "</div>";
76 76
         
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
          */
89 89
         private function _convertToNumber( $nSize ) {
90 90
             
91
-            $_nReturn     = substr( $nSize, 0, -1 );
92
-            switch( strtoupper( substr( $nSize, -1 ) ) ) {
91
+            $_nReturn = substr( $nSize, 0, -1 );
92
+            switch ( strtoupper( substr( $nSize, -1 ) ) ) {
93 93
                 case 'P':
94 94
                     $_nReturn *= 1024;
95 95
                 case 'T':
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             $_nLog = log( $nBytes, 1024 );
119 119
             $_iPower = ( int ) $_nLog;
120 120
             $_iSize = pow( 1024, $_nLog - $_iPower );
121
-            return $_iSize . $_aUnits[ $_iPower ];
121
+            return $_iSize.$_aUnits[ $_iPower ];
122 122
         }
123 123
 
124 124
 }
125 125
\ No newline at end of file
Please login to merge, or discard this patch.
factory/_abstract/view/attribute/AdminPageFramework_Attribute_Field.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,6 @@
 block discarded – undo
30 30
      * Returns the field container attribute array.
31 31
      * 
32 32
      * @remark      Formatting each sub-field should be performed prior to callign this method.
33
-     * @param       array       $aField     The (sub-)field definition array. This should have been formatted already.
34 33
      * @return      array       The generated field container attribute array.
35 34
      * @internal   
36 35
      * @since       3.5.3
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Admin Page Framework
4
- * 
5
- * http://en.michaeluno.jp/admin-page-framework/
6
- * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
- * 
8
- */
3
+         * Admin Page Framework
4
+         * 
5
+         * http://en.michaeluno.jp/admin-page-framework/
6
+         * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
+         * 
8
+         */
9 9
 
10 10
 /**
11 11
  * Provides methods to handle importing options.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * 
25 25
      * @since       3.6.0
26 26
      */
27
-    public $sContext    = 'field'; 
27
+    public $sContext = 'field'; 
28 28
 
29 29
     /**
30 30
      * Returns the field container attribute array.
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
 
42 42
         return array(
43 43
             'id'            => $this->aArguments[ '_field_container_id' ],
44
-            'data-type'     => $this->aArguments[ 'type' ],   // referred by the repeatable field JavaScript script.
44
+            'data-type'     => $this->aArguments[ 'type' ], // referred by the repeatable field JavaScript script.
45 45
             // @deprecated 3.6.0 
46 46
             // 'data-id_model' => $this->aArguments[ '_fields_container_id_model' ], // 3.3.1+
47
-            'class'         => "admin-page-framework-field admin-page-framework-field-" . $this->aArguments[ 'type' ]
47
+            'class'         => "admin-page-framework-field admin-page-framework-field-".$this->aArguments[ 'type' ]
48 48
                 . $this->getAOrB(
49 49
                     $this->aArguments[ 'attributes' ][ 'disabled' ],
50 50
                     ' disabled',
Please login to merge, or discard this patch.