Completed
Branch master (478c6b)
by
unknown
02:10
created
utility/base_utility/AdminPageFramework_Utility_SystemInformation.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
      * Returns an array of constants.
96 96
      * 
97 97
      * @since       3.4.6
98
-     * @param       array|string      $asCategory      The category key names of the returning array.
98
+     * @param       array|string      $asCategories      The category key names of the returning array.
99 99
      */
100 100
     static public function getDefinedConstants( $asCategories=null, $asRemovingCategories=null ) {
101 101
         
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $_sOutput = preg_replace(
42 42
             array(
43 43
                 '#^.*<body>(.*)</body>.*$#ms', '#<h2>PHP License</h2>.*$#ms',
44
-                '#<h1>Configuration</h1>#',  "#\r?\n#", "#</(h1|h2|h3|tr)>#", '# +<#',
44
+                '#<h1>Configuration</h1>#', "#\r?\n#", "#</(h1|h2|h3|tr)>#", '# +<#',
45 45
                 "#[ \t]+#", '#&nbsp;#', '#  +#', '# class=".*?"#', '%&#039;%',
46 46
                 '#<tr>(?:.*?)" src="(?:.*?)=(.*?)" alt="PHP Logo" /></a>'
47 47
                     .'<h1>PHP Version (.*?)</h1>(?:\n+?)</td></tr>#',
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
                 '#</tr>#'
53 53
             ),
54 54
             array(
55
-                '$1', '', '', '', '</$1>' . "\n", '<', ' ', ' ', ' ', '', ' ',
55
+                '$1', '', '', '', '</$1>'."\n", '<', ' ', ' ', ' ', '', ' ',
56 56
                 '<h2>PHP Configuration</h2>'."\n".'<tr><td>PHP Version</td><td>$2</td></tr>'.
57 57
                 "\n".'<tr><td>PHP Egg</td><td>$1</td></tr>',
58 58
                 '<tr><td>PHP Credits Egg</td><td>$1</td></tr>',
59
-                '<tr><td>Zend Engine</td><td>$2</td></tr>' . "\n" . '<tr><td>Zend Egg</td><td>$1</td></tr>',
59
+                '<tr><td>Zend Engine</td><td>$2</td></tr>'."\n".'<tr><td>Zend Egg</td><td>$1</td></tr>',
60 60
                 ' ',
61 61
                 '%S%',
62 62
                 '%E%'
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         unset( $_aSections[ 0 ] );
69 69
 
70 70
         $_aOutput = array();
71
-        foreach( $_aSections as $_sSection ) {
71
+        foreach ( $_aSections as $_sSection ) {
72 72
             $_iIndex = substr( $_sSection, 0, strpos( $_sSection, '</h2>' ) );
73 73
             preg_match_all(
74 74
                 '#%S%(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?%E%#',
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
                 $_aAskApache, 
77 77
                 PREG_SET_ORDER
78 78
             );
79
-            foreach( $_aAskApache as $_aMatches ) {
80
-                if ( ! isset( $_aMatches[ 1 ], $_aMatches[ 2 ] ) ) {
79
+            foreach ( $_aAskApache as $_aMatches ) {
80
+                if ( !isset( $_aMatches[ 1 ], $_aMatches[ 2 ] ) ) {
81 81
                     array_slice( $_aMatches, 2 );
82 82
                     continue;
83 83
                 }
84
-                $_aOutput[ $_iIndex ][ $_aMatches[ 1 ] ] = ! isset( $_aMatches[ 3 ] ) || $_aMatches[ 2 ] == $_aMatches[ 3 ]
84
+                $_aOutput[ $_iIndex ][ $_aMatches[ 1 ] ] = !isset( $_aMatches[ 3 ] ) || $_aMatches[ 2 ] == $_aMatches[ 3 ]
85 85
                     ? $_aMatches[ 2 ] 
86 86
                     : array_slice( $_aMatches, 2 );
87 87
             }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @since       3.4.6
98 98
      * @param       array|string      $asCategory      The category key names of the returning array.
99 99
      */
100
-    static public function getDefinedConstants( $asCategories=null, $asRemovingCategories=null ) {
100
+    static public function getDefinedConstants( $asCategories = null, $asRemovingCategories = null ) {
101 101
         
102 102
         $_aCategories           = is_array( $asCategories ) ? $asCategories : array( $asCategories );
103 103
         $_aCategories           = array_filter( $_aCategories );
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
     static public function getPHPErrorLogPath() {
125 125
                 
126 126
         $_aPHPInfo = self::getPHPInfo();
127
-        return isset( $_aPHPInfo['PHP Core']['error_log'] ) 
128
-            ? $_aPHPInfo['PHP Core']['error_log']
127
+        return isset( $_aPHPInfo[ 'PHP Core' ][ 'error_log' ] ) 
128
+            ? $_aPHPInfo[ 'PHP Core' ][ 'error_log' ]
129 129
             : '';
130 130
         
131 131
     }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * Returns a PHP error log.
135 135
      * @since       3.4.6
136 136
      */
137
-    static public function getPHPErrorLog( $iLines=1 ) {
137
+    static public function getPHPErrorLog( $iLines = 1 ) {
138 138
         
139 139
         $_sLog = self::getFileTailContents( self::getPHPErrorLogPath(), $iLines );
140 140
         
Please login to merge, or discard this patch.
factory/_common/utility/wp_utility/AdminPageFramework_WPUtility_Page.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -284,6 +284,7 @@
 block discarded – undo
284 284
              * Checkes whether the passed base url name is of the admin index page.
285 285
              * @since       3.5.3
286 286
              * return       boolean      Whether the passed base url name is of the admin index page.
287
+             * @param string $sPageNow
287 288
              */
288 289
             static private function _isInAdminIndex( $sPageNow ) {
289 290
                 return in_array(
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -281,11 +281,9 @@
 block discarded – undo
281 281
                 
282 282
                 if ( is_network_admin() ) {
283 283
                     $_sNeedle = '#/wp-admin/network/?(.*?)$#i';
284
-                }
285
-                else if ( is_user_admin() ) {
284
+                } else if ( is_user_admin() ) {
286 285
                     $_sNeedle = '#/wp-admin/user/?(.*?)$#i';
287
-                }
288
-                else {
286
+                } else {
289 287
                     $_sNeedle = '#/wp-admin/?(.*?)$#i';
290 288
                 }
291 289
                 preg_match( $_sNeedle, $_SERVER[ 'PHP_SELF' ], $_aMatches );
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
                 'getPostTypeByTypeNow',
57 57
                 'getPostTypeByScreenObject',
58 58
                 'getPostTypeByREQUEST',
59
-                'getPostTypeByPostObject',  // 3.6.0+ Moved to the last as it is not reliable.
59
+                'getPostTypeByPostObject', // 3.6.0+ Moved to the last as it is not reliable.
60 60
             );
61 61
             foreach ( $_aMethodsToTry as $_sMethodName ) {
62 62
                 $_sPostType = call_user_func( array( __CLASS__, $_sMethodName ) );
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
      * @param       array|string        The post type slug(s) to check. If this is empty, the method just checks the current page is a taxonomy page.
121 121
      * @return      boolean
122 122
      */
123
-    static public function isCustomTaxonomyPage( $asPostTypes=array() ) {
123
+    static public function isCustomTaxonomyPage( $asPostTypes = array() ) {
124 124
 
125
-        if ( ! in_array( self::getPageNow(), array( 'tags.php', 'edit-tags.php', 'term.php' ) ) ) {
125
+        if ( !in_array( self::getPageNow(), array( 'tags.php', 'edit-tags.php', 'term.php' ) ) ) {
126 126
             return false;
127 127
         }
128 128
         return self::isCurrentPostTypeIn( $asPostTypes );
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
      * Otherwise, it will check if the page belongs to the given post type(s).
138 138
      * @return      boolean
139 139
      */
140
-    static public function isPostDefinitionPage( $asPostTypes=array() ) {
140
+    static public function isPostDefinitionPage( $asPostTypes = array() ) {
141 141
 
142 142
         // If it's not the post definition page,
143
-        if ( ! in_array( self::getPageNow(), array( 'post.php', 'post-new.php', ) ) ) {
143
+        if ( !in_array( self::getPageNow(), array( 'post.php', 'post-new.php',) ) ) {
144 144
             return false;
145 145
         }
146 146
         return self::isCurrentPostTypeIn( $asPostTypes );
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      *
174 174
      * @since 3.0.0
175 175
      */
176
-    static public function isPostListingPage( $asPostTypes=array() ) {
176
+    static public function isPostListingPage( $asPostTypes = array() ) {
177 177
 
178 178
         if ( 'edit.php' != self::getPageNow() ) {
179 179
             return false;
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
         $_aPostTypes = self::getAsArray( $asPostTypes );
183 183
 
184
-        if ( ! isset( $_GET[ 'post_type' ] )  ) {
184
+        if ( !isset( $_GET[ 'post_type' ] ) ) {
185 185
             return in_array( 'post', $_aPostTypes );
186 186
         }
187 187
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             0 => '_getPageNow_FrontEnd',
220 220
             1 => '_getPageNow_BackEnd',
221 221
         );
222
-        $_sMethodName  = $_aMethodNames[ ( integer ) is_admin() ];
222
+        $_sMethodName = $_aMethodNames[ ( integer ) is_admin() ];
223 223
         self::$_sPageNow = self::$_sMethodName();
224 224
         return self::$_sPageNow;
225 225
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 
315 315
         if ( isset( $GLBOALS[ 'page_hook' ] ) ) {
316 316
             return is_network_admin()
317
-                ? $GLBOALS[ 'page_hook' ] . '-network'
317
+                ? $GLBOALS[ 'page_hook' ].'-network'
318 318
                 : $GLBOALS[ 'page_hook' ];
319 319
         }
320 320
 
@@ -328,11 +328,11 @@  discard block
 block discarded – undo
328 328
      * @since       3.7.0
329 329
      * @return      boolean
330 330
      */
331
-    static public function doesMetaBoxExist( $sContext='' ) {
331
+    static public function doesMetaBoxExist( $sContext = '' ) {
332 332
 
333 333
         $_aDimensions = array( 'wp_meta_boxes', $GLOBALS[ 'page_hook' ] );
334 334
         if ( $sContext ) {
335
-            $_aDimensions[] = $sContext;
335
+            $_aDimensions[ ] = $sContext;
336 336
         }
337 337
         $_aSideMetaBoxes = self::getElementAsArray(
338 338
             $GLOBALS,
Please login to merge, or discard this patch.
development/utility/plugin_bootstrap/AdminPageFramework_PluginBootstrap.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      * @param       string      $sPluginFilePath        The plugin file path.
39 39
      * @param       string      $sPluginHookPrefix      The plugin hook slug without underscore. This will be used to construct hook names.
40 40
      * @param       string      $sSetUpHook             The action hook name for the setUp callback. Default 'plugins_loaded'.
41
-     * @param       string      $iPriority              The priority. Set a lower number to get loader earlier. Default: `10`.
41
+     * @param       integer      $iPriority              The priority. Set a lower number to get loader earlier. Default: `10`.
42 42
      */
43 43
     public function __construct( $sPluginFilePath, $sPluginHookPrefix='', $sSetUpHook='plugins_loaded', $iPriority=10 ) {
44 44
         
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         register_deactivation_hook( $this->sFilePath, array( $this, 'replyToPluginDeactivation' ) );
77 77
                  
78 78
         // 8. Schedule to load plugin specific components.
79
-        if ( ! $this->sSetUpHook || did_action( $this->sSetUpHook ) )  {
79
+        if ( ! $this->sSetUpHook || did_action( $this->sSetUpHook ) ) {
80 80
             $this->_replyToLoadPluginComponents();
81 81
         } else {
82 82
             add_action( $this->sSetUpHook, array( $this, '_replyToLoadPluginComponents' ), $this->iPriority );
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      * @param       string      $sSetUpHook             The action hook name for the setUp callback. Default 'plugins_loaded'.
123 123
      * @param       string      $iPriority              The priority. Set a lower number to get loader earlier. Default: `10`.
124 124
      */
125
-    public function __construct( $sPluginFilePath, $sPluginHookPrefix='', $sSetUpHook='plugins_loaded', $iPriority=10 ) {
125
+    public function __construct( $sPluginFilePath, $sPluginHookPrefix = '', $sSetUpHook = 'plugins_loaded', $iPriority = 10 ) {
126 126
 
127 127
         // Check if it has been loaded.
128 128
         if ( $this->_hasLoaded() ) {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         register_deactivation_hook( $this->sFilePath, array( $this, 'replyToPluginDeactivation' ) );
159 159
 
160 160
         // 8. Schedule to load plugin specific components.
161
-        if ( ! $this->sSetUpHook || did_action( $this->sSetUpHook ) )  {
161
+        if ( !$this->sSetUpHook || did_action( $this->sSetUpHook ) ) {
162 162
             $this->_replyToLoadPluginComponents();
163 163
         } else {
164 164
             add_action( $this->sSetUpHook, array( $this, '_replyToLoadPluginComponents' ), $this->iPriority );
@@ -200,14 +200,14 @@  discard block
 block discarded – undo
200 200
         protected function _registerClasses() {
201 201
 
202 202
             // This class should be used in the framework bootstrap so disabling the auto-load option for performance.
203
-            if ( ! class_exists( 'AdminPageFramework_RegisterClasses', false ) ) {
203
+            if ( !class_exists( 'AdminPageFramework_RegisterClasses', false ) ) {
204 204
                 return;
205 205
             }
206 206
 
207 207
             // Register classes
208 208
             new AdminPageFramework_RegisterClasses(
209
-                $this->getScanningDirs(),   // scanning directory paths
210
-                array(),                    // autoloader options
209
+                $this->getScanningDirs(), // scanning directory paths
210
+                array(), // autoloader options
211 211
                 $this->getClasses()         // pre-generated class list
212 212
             );
213 213
 
Please login to merge, or discard this patch.
class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Page_Base.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -25,6 +25,7 @@
 block discarded – undo
25 25
 
26 26
     /**
27 27
      * Sets up hooks and properties.
28
+     * @param AdminPageFrameworkLoader_AdminPage $oFactory
28 29
      */
29 30
     public function __construct( $oFactory, array $aPageArguments ) {
30 31
         
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     public function __construct( $oFactory, array $aPageArguments ) {
30 30
 
31 31
         $this->oFactory     = $oFactory;
32
-        $this->sPageSlug    = $aPageArguments['page_slug'];
32
+        $this->sPageSlug    = $aPageArguments[ 'page_slug' ];
33 33
         $this->_addPage( $aPageArguments );
34 34
         $this->construct( $oFactory );
35 35
 
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function replyToLoadResources( $oFactory ) {
60 60
 
61
-        $_sCSSPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/' . $this->sPageSlug . '.css';
62
-        if ( ! file_exists( $_sCSSPath ) ) {
61
+        $_sCSSPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/'.$this->sPageSlug.'.css';
62
+        if ( !file_exists( $_sCSSPath ) ) {
63 63
             return;
64 64
         }
65 65
         $this->oFactory->enqueueStyle(
Please login to merge, or discard this patch.
include/class/admin/dashboard/AdminPageFrameworkLoader_AdminPageWelcome.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function start() {
27 27
         
28
-        if ( ! is_admin() ) {
28
+        if ( !is_admin() ) {
29 29
             return;
30 30
         }
31 31
         
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
             // When newly installed, the 'welcomed' value is not set.
49 49
             $_oOption = AdminPageFrameworkLoader_Option::getInstance();
50
-            if ( ! $_oOption->get( 'welcomed' ) ) {                
50
+            if ( !$_oOption->get( 'welcomed' ) ) {                
51 51
                 $this->_setInitialOptions( $_oOption, AdminPageFrameworkLoader_Registry::VERSION );
52 52
                 $this->_goToWelcomePage(); // will exit
53 53
             }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         private function _goToWelcomePage() {    
74 74
         
75 75
             $_sWelcomePageURL = apply_filters(
76
-                AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_admin_welcome_redirect_url',
76
+                AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_admin_welcome_redirect_url',
77 77
                 add_query_arg( 
78 78
                     array( 'page' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ] ),
79 79
                     admin_url( 'index.php' )   // Dashboard
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
     public function setUp() {
94 94
   
95 95
         $_oOption = AdminPageFrameworkLoader_Option::getInstance();
96
-        if ( ! $_oOption->get( 'enable_admin_pages' ) ) {
96
+        if ( !$_oOption->get( 'enable_admin_pages' ) ) {
97 97
             return;
98 98
         }
99 99
         
100
-        $this->sPageSlug  = AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ];
100
+        $this->sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ];
101 101
         
102 102
         // Root page
103 103
         $this->setRootMenuPage( 
@@ -108,12 +108,12 @@  discard block
 block discarded – undo
108 108
         $this->addSubMenuItems( 
109 109
             array(
110 110
                 'title'         => AdminPageFrameworkLoader_Registry::SHORTNAME,
111
-                'page_slug'     => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ],    // page slug
111
+                'page_slug'     => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], // page slug
112 112
                 'show_in_menu'  => false,
113 113
                 'style'         => array(
114
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/about.css', 
115
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/column.css', 
116
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/javascript/flip/jquery.m.flip.css',
114
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/about.css', 
115
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/column.css', 
116
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/javascript/flip/jquery.m.flip.css',
117 117
                     version_compare( $GLOBALS[ 'wp_version' ], '3.8', '<' )
118 118
                         ? ".about-wrap .introduction h2 {
119 119
                                 padding: 1em;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                         }",     
128 128
                 ),
129 129
                 'script'        => array(
130
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/javascript/flip/jquery.m.flip.js',
130
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/javascript/flip/jquery.m.flip.js',
131 131
                     "jQuery( document ).ready( function() {
132 132
                         jQuery( '.apf-badge-image' ).mflip();
133 133
                     } );",
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
         $this->setPluginSettingsLinkLabel( '' ); // pass an empty string to disable it.
139 139
         
140 140
         // Hook
141
-        add_action( "load_" . $this->oProp->sClassName, array( $this, 'replyToLoadClassPages' ) );
142
-        add_action( "load_" . AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], array( $this, 'replyToLoadPage' ) );
141
+        add_action( "load_".$this->oProp->sClassName, array( $this, 'replyToLoadClassPages' ) );
142
+        add_action( "load_".AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], array( $this, 'replyToLoadPage' ) );
143 143
 
144 144
     }   
145 145
     
@@ -165,14 +165,14 @@  discard block
 block discarded – undo
165 165
 
166 166
         $_sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ];
167 167
         new AdminPageFrameworkLoader_AdminPageWelcome_Welcome( 
168
-            $this,              // factory object
169
-            $_sPageSlug,        // page slug
168
+            $this, // factory object
169
+            $_sPageSlug, // page slug
170 170
             array(
171 171
                 'tab_slug'      => 'welcome',
172 172
                 // 'title'         => __( "What's New", 'admin-page-framework-loader' ),   // '
173 173
                 'style'         => array(
174
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/admin.css',
175
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/code.css',
174
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/admin.css',
175
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/code.css',
176 176
                 ),
177 177
             )                
178 178
         );        
@@ -201,24 +201,24 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function replyToFilterContentTop( $sContent ) {
203 203
 
204
-        $_sVersion      = '- ' . AdminPageFrameworkLoader_Registry::VERSION;
205
-        $_sPluginName   = AdminPageFrameworkLoader_Registry::SHORTNAME . ' ' . $_sVersion;
204
+        $_sVersion      = '- '.AdminPageFrameworkLoader_Registry::VERSION;
205
+        $_sPluginName   = AdminPageFrameworkLoader_Registry::SHORTNAME.' '.$_sVersion;
206 206
         
207 207
         $_sBadgeURL     = esc_url( AdminPageFrameworkLoader_Registry::getPluginURL( 'asset/image/icon-128x128.png' ) );
208 208
         
209 209
         $_aOutput   = array();
210
-        $_aOutput[] = "<h1>" 
210
+        $_aOutput[ ] = "<h1>" 
211 211
                 . sprintf( __( 'Welcome to %1$s', 'admin-page-framework-loader' ), $_sPluginName )
212 212
             . "</h1>";
213
-        $_aOutput[] = "<div class='about-text'>"
213
+        $_aOutput[ ] = "<div class='about-text'>"
214 214
                 . sprintf( __( 'Thank you for updating to the latest version! %1$s is ready to make your plugin or theme development faster, more organized and better!', 'admin-page-framework-loader' ), $_sPluginName )
215 215
             . "</div>";
216
-        $_aOutput[] = ''
216
+        $_aOutput[ ] = ''
217 217
                 . "<div class='apf-badge'>"
218 218
                     . "<div class='apf-badge-image m-flip'>"
219 219
                         . "<img src='{$_sBadgeURL}' />"
220 220
                     . "</div>"
221
-                    . "<span class='label'>" . sprintf( __( 'Version %1$s', 'admin-page-framework-loader' ), $_sVersion ) . "</span>"
221
+                    . "<span class='label'>".sprintf( __( 'Version %1$s', 'admin-page-framework-loader' ), $_sVersion )."</span>"
222 222
                 . "</div>";
223 223
            
224 224
         return implode( PHP_EOL, $_aOutput )
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
             // When newly installed, the 'welcomed' value is not set.
49 49
             $_oOption = AdminPageFrameworkLoader_Option::getInstance();
50
-            if ( ! $_oOption->get( 'welcomed' ) ) {                
50
+            if ( ! $_oOption->get( 'welcomed' ) ) {
51 51
                 $this->_setInitialOptions( $_oOption, AdminPageFrameworkLoader_Registry::VERSION );
52 52
                 $this->_goToWelcomePage(); // will exit
53 53
             }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 
71 71
             }
72 72
             
73
-        private function _goToWelcomePage() {    
73
+        private function _goToWelcomePage() {
74 74
         
75 75
             $_sWelcomePageURL = apply_filters(
76 76
                 AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_admin_welcome_redirect_url',
Please login to merge, or discard this patch.
class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPage.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function start() {
20 20
   
21
-        if ( ! $this->oProp->bIsAdmin ) {
21
+        if ( !$this->oProp->bIsAdmin ) {
22 22
             return;
23 23
         }
24 24
       
25 25
         // Allows the user to switch the menu visibility.
26
-        if ( isset( $_GET['enable_apfl_admin_pages'] ) ) {
26
+        if ( isset( $_GET[ 'enable_apfl_admin_pages' ] ) ) {
27 27
             
28 28
             // Update the options and reload the page
29 29
             $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ] );
@@ -67,15 +67,15 @@  discard block
 block discarded – undo
67 67
     public function setUp() {
68 68
 
69 69
         $_aOptions          = $this->oProp->aOptions;
70
-        $_bAdminPageEnabled = ! is_array( $_aOptions )  // for the first time of loading, the option is not set and it is not an array. 
71
-            || ( isset( $_aOptions['enable_admin_pages'] ) && $_aOptions['enable_admin_pages'] );    
70
+        $_bAdminPageEnabled = !is_array( $_aOptions )  // for the first time of loading, the option is not set and it is not an array. 
71
+            || ( isset( $_aOptions[ 'enable_admin_pages' ] ) && $_aOptions[ 'enable_admin_pages' ] );    
72 72
     
73 73
         // Set up pages
74 74
         if ( $_bAdminPageEnabled ) {
75 75
             
76 76
             $this->setRootMenuPage( 
77
-                AdminPageFrameworkLoader_Registry::SHORTNAME,     // menu slug
78
-                AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/image/wp-logo_16x16.png', // menu icon
77
+                AdminPageFrameworkLoader_Registry::SHORTNAME, // menu slug
78
+                AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/image/wp-logo_16x16.png', // menu icon
79 79
                 4  // menu position
80 80
             ); 
81 81
                         
@@ -86,19 +86,19 @@  discard block
 block discarded – undo
86 86
                     'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'tool' ],
87 87
                     'title'     => __( 'Tools', 'admin-page-framework-loader' ),
88 88
                     'style'     => array(
89
-                        AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/code.css',
90
-                        AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/admin.css'
89
+                        AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/code.css',
90
+                        AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/admin.css'
91 91
                     ),
92 92
                 )
93 93
             );
94 94
             new AdminPageFrameworkLoader_AdminPage_Addon(
95 95
                 $this,
96 96
                 array(
97
-                    'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'addon' ],    // page slug
97
+                    'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'addon' ], // page slug
98 98
                     'title'     => __( 'Add Ons', 'admin-page-framework-loader' ),
99 99
                     'style'     => array(
100
-                        AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/code.css',
101
-                        AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/admin.css'
100
+                        AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/code.css',
101
+                        AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/admin.css'
102 102
                     ),                    
103 103
                 )                
104 104
             );
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
                     'title'     => __( 'Help', 'admin-page-framework-loader' ),
110 110
                     'order'     => 1000, // to be the last menu item
111 111
                     'style'     => array(
112
-                        AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/code.css',
113
-                        AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/admin.css'
112
+                        AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/code.css',
113
+                        AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/admin.css'
114 114
                     ),                    
115 115
                 )                
116 116
             );
117 117
             
118
-            add_action( 'load_' . $this->oProp->sClassName, array( $this, 'replyToDoPageSettings' ) );
118
+            add_action( 'load_'.$this->oProp->sClassName, array( $this, 'replyToDoPageSettings' ) );
119 119
             
120 120
         }
121 121
               
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
          */
129 129
         private function _addActionLinks( $_bAdminPageEnabled, $_aOptions ) {
130 130
           
131
-            if ( 'plugins.php' !==  $this->oProp->sPageNow ) {
131
+            if ( 'plugins.php' !== $this->oProp->sPageNow ) {
132 132
                 return;
133 133
             }
134 134
           
@@ -152,24 +152,24 @@  discard block
 block discarded – undo
152 152
              * @return      string
153 153
              */
154 154
             private function _getAdminURLTools( $_bAdminPageEnabled ) {
155
-                if ( ! $_bAdminPageEnabled ) {
155
+                if ( !$_bAdminPageEnabled ) {
156 156
                     return;
157 157
                 }
158
-                $_sLink    = esc_url(
158
+                $_sLink = esc_url(
159 159
                     add_query_arg( 
160 160
                         array( 
161
-                            'page' => AdminPageFrameworkLoader_Registry::$aAdminPages['tool'],
161
+                            'page' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'tool' ],
162 162
                         ),
163 163
                         admin_url( 'admin.php' )
164 164
                     )
165 165
                 );                
166
-                return "<a href='{$_sLink}'>" . __( 'Tools', 'admin-page-framework-loader' ) . "</a>";
166
+                return "<a href='{$_sLink}'>".__( 'Tools', 'admin-page-framework-loader' )."</a>";
167 167
             }
168 168
             /**
169 169
              * Returns the Enable /Disable Admin Pages link.
170 170
              */
171 171
             private function _getAdminPageSwitchLink( $bEnabled ) {
172
-                $_sLink    = esc_url( 
172
+                $_sLink = esc_url( 
173 173
                     add_query_arg( 
174 174
                         array( 
175 175
                             'enable_apfl_admin_pages' => $bEnabled ? 0 : 1,
@@ -177,19 +177,19 @@  discard block
 block discarded – undo
177 177
                     )
178 178
                 );            
179 179
                 return $bEnabled
180
-                    ? "<a href='{$_sLink}'>" . __( 'Disable Admin Pages', 'admin-page-framework-loader' ) . "</a>"
181
-                    : "<a href='{$_sLink}'>" . __( 'Enable Admin Pages', 'admin-page-framework-loader' ) . "</a>";                     
180
+                    ? "<a href='{$_sLink}'>".__( 'Disable Admin Pages', 'admin-page-framework-loader' )."</a>"
181
+                    : "<a href='{$_sLink}'>".__( 'Enable Admin Pages', 'admin-page-framework-loader' )."</a>";                     
182 182
             }
183 183
             /**
184 184
              * Returns the switch link of the demo pages.
185 185
              */
186
-            private function _getDemoSwitcherLink( $_bAdminPageEnabled, $mOptions=array() ) {
186
+            private function _getDemoSwitcherLink( $_bAdminPageEnabled, $mOptions = array() ) {
187 187
                 
188
-                if ( ! $_bAdminPageEnabled ) {
188
+                if ( !$_bAdminPageEnabled ) {
189 189
                     return '';
190 190
                 }
191
-                $_bEnabled  = isset( $mOptions['enable_demo'] ) && $mOptions['enable_demo'];
192
-                $_sLink    = esc_url( 
191
+                $_bEnabled = isset( $mOptions[ 'enable_demo' ] ) && $mOptions[ 'enable_demo' ];
192
+                $_sLink = esc_url( 
193 193
                     add_query_arg( 
194 194
                         array( 
195 195
                             'enable_apfl_demo_pages' => $_bEnabled ? 0 : 1,
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
                     )
198 198
                 );        
199 199
                 return $_bEnabled
200
-                    ? "<a href='{$_sLink}'>" . __( 'Disable Demo', 'admin-page-framework-loader' ) . "</a>"
201
-                    : "<a href='{$_sLink}'><strong id='activate-demo-action-link' style='font-size: 1em;'>" . __( 'Enable Demo', 'admin-page-framework-loader' ) . "</strong></a>";
200
+                    ? "<a href='{$_sLink}'>".__( 'Disable Demo', 'admin-page-framework-loader' )."</a>"
201
+                    : "<a href='{$_sLink}'><strong id='activate-demo-action-link' style='font-size: 1em;'>".__( 'Enable Demo', 'admin-page-framework-loader' )."</strong></a>";
202 202
                 
203 203
             }      
204 204
 
@@ -214,14 +214,14 @@  discard block
 block discarded – undo
214 214
     
215 215
         // Page meta boxes            
216 216
         new AdminPageFrameworkLoader_AdminPageMetaBox_Notification(
217
-            null,                                           // meta box id - passing null will make it auto generate
217
+            null, // meta box id - passing null will make it auto generate
218 218
             __( 'Notification', 'admin-page-framework-loader' ), // title
219 219
             array( // page slugs
220 220
                 AdminPageFrameworkLoader_Registry::$aAdminPages[ 'tool' ],
221 221
                 AdminPageFrameworkLoader_Registry::$aAdminPages[ 'addon' ],
222 222
                 AdminPageFrameworkLoader_Registry::$aAdminPages[ 'help' ],
223 223
             ),
224
-            'side',                                       // context
224
+            'side', // context
225 225
             'default'                                     // priority
226 226
         );        
227 227
     
Please login to merge, or discard this patch.
admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
     public function replyToLoadPage( $oFactory ) {
20 20
         
21 21
         new AdminPageFrameworkLoader_AdminPage_Addon_Top( 
22
-            $oFactory,          // factory object
23
-            $this->sPageSlug,   // page slug
22
+            $oFactory, // factory object
23
+            $this->sPageSlug, // page slug
24 24
             array(              // tab definition
25 25
                 'tab_slug'      => 'top',
26 26
                 'title'         => __( 'Add Ons', 'admin-page-framework-loader' ),
Please login to merge, or discard this patch.
help/AdminPageFrameworkLoader_AdminPage_Help_Information.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
     public function replyToDoTab( /* $oFactory */ ) {
22 22
     
23 23
         echo $this->_getReadmeContents( 
24
-            AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt', 
25
-            '',     // no TOC
24
+            AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/about.txt', 
25
+            '', // no TOC
26 26
             array( 'Support' )
27 27
         );    
28 28
  
Please login to merge, or discard this patch.
class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Section_Base.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $this->sTabSlug     = $aSectionDefinition[ 'tab_slug' ];
48 48
         $this->sSectionID   = $aSectionDefinition[ 'section_id' ];
49 49
         
50
-        if ( ! $this->sSectionID ) {
50
+        if ( !$this->sSectionID ) {
51 51
             return;
52 52
         }
53 53
         $this->_addSection( $oFactory, $sPageSlug, $aSectionDefinition );
@@ -60,14 +60,14 @@  discard block
 block discarded – undo
60 60
         
61 61
         add_action( 
62 62
             // 'validation_' . $this->sPageSlug . '_' . $this->sTabSlug, 
63
-            'validation_' . $oFactory->oProp->sClassName . '_' . $this->sSectionID,
63
+            'validation_'.$oFactory->oProp->sClassName.'_'.$this->sSectionID,
64 64
             array( $this, 'validate' ), 
65 65
             10, 
66 66
             4 
67 67
         );
68 68
         
69 69
         $oFactory->addSettingSections(
70
-            $sPageSlug,    // target page slug
70
+            $sPageSlug, // target page slug
71 71
             $aSectionDefinition
72 72
         );        
73 73
         
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $_aErrors   = array();
97 97
                  
98 98
         // An invalid value is found. Set a field error array and an admin notice and return the old values.
99
-        if ( ! $_bVerified ) {
99
+        if ( !$_bVerified ) {
100 100
             $oFactory->setFieldErrors( $_aErrors );     
101 101
             $oFactory->setSettingNotice( __( 'There was something wrong with your input.', 'admin-page-framework-loader' ) );
102 102
             return $aOldInput;
Please login to merge, or discard this patch.