Passed
Branch dev (f20a26)
by
unknown
22:06
created
admin-page-framework-loader.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
  */
17 17
 class AdminPageFrameworkLoader_Registry_Base {
18 18
 
19
-    const VERSION        = '3.9.1b02';    // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
19
+    const VERSION        = '3.9.1b02'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
20 20
     const NAME           = 'Admin Page Framework - Loader'; // the name is not 'Admin Page Framework' because warning messages gets confusing.
21
-    const SHORTNAME      = 'Admin Page Framework';  // used for a menu title etc.
21
+    const SHORTNAME      = 'Admin Page Framework'; // used for a menu title etc.
22 22
     const DESCRIPTION    = 'Loads Admin Page Framework which facilitates WordPress plugin and theme development.';
23 23
     const URI            = 'https://admin-page-framework.michaeluno.jp/';
24 24
     const AUTHOR         = 'miunosoft (Michael Uno)';
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
      * @remark This is also accessed from `uninstall.php` so do not remove.
56 56
      * @remark Do not exceed 8 characters as a transient name allows 45 characters or less ( 40 for site transients ) so that md5 (32 characters) can be added.
57 57
      */
58
-    const TRANSIENT_PREFIX         = 'APFL_';
58
+    const TRANSIENT_PREFIX = 'APFL_';
59 59
 
60 60
     /**
61 61
      * The hook slug used for the prefix of action and filter hook names.
62 62
      *
63 63
      * @remark The ending underscore is not necessary.
64 64
      */
65
-    const HOOK_SLUG                = 'admin_page_framework_loader';
65
+    const HOOK_SLUG = 'admin_page_framework_loader';
66 66
 
67 67
     /**
68 68
      * The text domain slug and its path.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     static public $aAdminPages = array(
118 118
         // key => 'page slug'
119
-        'about' => 'apfl_about',   // the welcome page
119
+        'about' => 'apfl_about', // the welcome page
120 120
         'addon' => 'apfl_addons',
121 121
         'tool'  => 'apfl_tools',
122 122
         'help'  => 'apfl_contact',
@@ -152,12 +152,12 @@  discard block
 block discarded – undo
152 152
      * @since  3.5.0
153 153
      * @return string
154 154
      */
155
-    public static function getPluginURL( $sRelativePath='' ) {
155
+    public static function getPluginURL( $sRelativePath = '' ) {
156 156
         if ( isset( self::$_sPluginURLCache ) ) {
157
-            return self::$_sPluginURLCache . $sRelativePath;
157
+            return self::$_sPluginURLCache.$sRelativePath;
158 158
         }
159 159
         self::$_sPluginURLCache = trailingslashit( plugins_url( '', self::$sFilePath ) );
160
-        return self::$_sPluginURLCache . $sRelativePath;
160
+        return self::$_sPluginURLCache.$sRelativePath;
161 161
     }
162 162
         /**
163 163
          * @since       3.7.9
@@ -185,13 +185,13 @@  discard block
 block discarded – undo
185 185
      * Sets an admin notice.
186 186
      * @since 3.5.0
187 187
      */
188
-    static public function setAdminNotice( $sMessage, $sClassAttribute='error' ) {
189
-        if ( ! is_admin() ) {
188
+    static public function setAdminNotice( $sMessage, $sClassAttribute = 'error' ) {
189
+        if ( !is_admin() ) {
190 190
             return;
191 191
         }
192
-        self::$_aAdminNotices[] = array(
192
+        self::$_aAdminNotices[ ] = array(
193 193
             'message'           => $sMessage,
194
-            'class_attribute'   => trim( $sClassAttribute ) . ' notice is-dismissible',
194
+            'class_attribute'   => trim( $sClassAttribute ).' notice is-dismissible',
195 195
         );
196 196
         add_action( 'admin_notices', array( __CLASS__, '_replyToSetAdminNotice' ) );
197 197
     }
@@ -200,12 +200,12 @@  discard block
 block discarded – undo
200 200
          * @since 3.5.0
201 201
          */
202 202
         static public function _replyToSetAdminNotice() {
203
-            foreach( self::$_aAdminNotices as $_aAdminNotice ) {
204
-                echo "<div class='" . esc_attr( $_aAdminNotice[ 'class_attribute' ] ) . " notice is-dismissible'>"
203
+            foreach ( self::$_aAdminNotices as $_aAdminNotice ) {
204
+                echo "<div class='".esc_attr( $_aAdminNotice[ 'class_attribute' ] )." notice is-dismissible'>"
205 205
                         ."<p>"
206 206
                             . sprintf(
207
-                                '<strong>%1$s</strong>: ' . $_aAdminNotice[ 'message' ],
208
-                                self::NAME . ' ' . self::VERSION
207
+                                '<strong>%1$s</strong>: '.$_aAdminNotice[ 'message' ],
208
+                                self::NAME.' '.self::VERSION
209 209
                             )
210 210
                         . "</p>"
211 211
                     . "</div>";
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 AdminPageFrameworkLoader_Registry::setUp( __FILE__ );
218 218
 
219 219
 // Initial checks. - Do no load if accessed directly, not exiting because the 'uninstall.php' and inclusion list generator will load this file.
220
-if ( ! defined( 'ABSPATH' ) ) {
220
+if ( !defined( 'ABSPATH' ) ) {
221 221
     return;
222 222
 }
223 223
 if ( defined( 'DOING_UNINSTALL' ) && DOING_UNINSTALL ) {
@@ -229,8 +229,8 @@  discard block
 block discarded – undo
229 229
 
230 230
     $_bFrameworkLoaded = class_exists( 'AdminPageFramework_Registry', false );
231 231
     if (
232
-        ! $_bFrameworkLoaded
233
-        || ! defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility
232
+        !$_bFrameworkLoaded
233
+        || !defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility
234 234
         || version_compare( AdminPageFramework_Registry::VERSION, AdminPageFrameworkLoader_Registry::VERSION, '<' )
235 235
     ) {
236 236
         AdminPageFrameworkLoader_Registry::setAdminNotice(
@@ -248,18 +248,18 @@  discard block
 block discarded – undo
248 248
 add_action( 'admin_init', 'AdminPageFrameworkLoader_Warning' );
249 249
 
250 250
 // Include the library file - the development version will be available if you cloned the GitHub repository.
251
-$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/development/admin-page-framework.php';
251
+$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/development/admin-page-framework.php';
252 252
 $_bDebugMode              = defined( 'WP_DEBUG' ) && WP_DEBUG;
253 253
 $_bLoadDevelopmentVersion = $_bDebugMode && file_exists( $_sDevelopmentVersionPath );
254 254
 include(
255 255
     $_bLoadDevelopmentVersion
256 256
         ? $_sDevelopmentVersionPath
257
-        : AdminPageFrameworkLoader_Registry::$sDirPath . '/library/apf/admin-page-framework.php'
257
+        : AdminPageFrameworkLoader_Registry::$sDirPath.'/library/apf/admin-page-framework.php'
258 258
 );
259 259
 
260 260
 // Include the framework loader plugin components.
261 261
 include( AdminPageFramework_Registry::$aClassFiles[ 'AdminPageFramework_PluginBootstrap' ] );
262
-include( AdminPageFrameworkLoader_Registry::$sDirPath . '/include/class/AdminPageFrameworkLoader_Bootstrap.php' );
262
+include( AdminPageFrameworkLoader_Registry::$sDirPath.'/include/class/AdminPageFrameworkLoader_Bootstrap.php' );
263 263
 new AdminPageFrameworkLoader_Bootstrap(
264 264
     AdminPageFrameworkLoader_Registry::$sFilePath,
265 265
     AdminPageFrameworkLoader_Registry::HOOK_SLUG    // hook prefix
Please login to merge, or discard this patch.