Completed
Branch dev (3dc60b)
by
unknown
37s
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.
uninstall.php 3 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   +9 added lines, -9 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
     return;
14 14
 }
15
-if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
15
+if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {
16 16
     return;
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,11 +41,11 @@  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 46
     $_oWPDB = ${ 'GLOBALS' }[ 'wpdb' ];
47
-    foreach( $_aPrefixes as $_sPrefix ) {
48
-        if ( ! $_sPrefix ) { 
47
+    foreach ( $_aPrefixes as $_sPrefix ) {
48
+        if ( !$_sPrefix ) { 
49 49
             continue; 
50 50
         }
51 51
         $_oWPDB->query( "DELETE FROM `{$_oWPDB->prefix}options` WHERE `option_name` LIKE ( '_transient_%{$_sPrefix}%' )" );
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     );
46 46
     $_oWPDB = ${ 'GLOBALS' }[ 'wpdb' ];
47 47
     foreach( $_aPrefixes as $_sPrefix ) {
48
-        if ( ! $_sPrefix ) { 
48
+        if ( ! $_sPrefix ) {
49 49
             continue; 
50 50
         }
51 51
         $_oWPDB->query( "DELETE FROM `{$_oWPDB->prefix}options` WHERE `option_name` LIKE ( '_transient_%{$_sPrefix}%' )" );
Please login to merge, or discard this patch.
admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_FAQ.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
             return $_aNestedSections;
81 81
             
82 82
         }
83
-        private function getFAQContents()  {
83
+        private function getFAQContents() {
84 84
             
85 85
             $_aReplacements   = array(
86 86
                 '%PLUGIN_DIR_URL%'  => AdminPageFrameworkLoader_Registry::getPluginURL(),
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function replyToLoadTab( $oAdminPage ) {
23 23
 
24
-        $_aSections  = $this->getContentsByHeader( $this->getFAQContents(), 4 );
25
-        foreach( $_aSections as $_iIndex => $_aContent ) {
24
+        $_aSections = $this->getContentsByHeader( $this->getFAQContents(), 4 );
25
+        foreach ( $_aSections as $_iIndex => $_aContent ) {
26 26
 
27 27
             $_sTitle   = $_aContent[ 0 ];
28 28
             $_sContent = $this->_getFAQSubSections( $_aContent[ 1 ] );
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             $oAdminPage->addSettingSections(
33 33
                 $this->sPageSlug, // the target page slug
34 34
                 array(
35
-                    'section_id'        => 'faq_sections_' . $_iIndex,
35
+                    'section_id'        => 'faq_sections_'.$_iIndex,
36 36
                     'tab_slug'          => $this->sTabSlug,
37 37
                     'section_tab_slug'  => 'apf_faq',
38 38
                     'title'             => $_sTitle,
@@ -54,17 +54,17 @@  discard block
 block discarded – undo
54 54
 
55 55
             $_aNestedSections = array();
56 56
             $_iLastIndex = count( $aItems ) - 1;
57
-            foreach( $aItems as $_iIndex => $_aContent ) {
57
+            foreach ( $aItems as $_iIndex => $_aContent ) {
58 58
 
59
-                $_oParser   = new AdminPageFramework_WPReadmeParser( $_aContent[ 1 ] );
59
+                $_oParser = new AdminPageFramework_WPReadmeParser( $_aContent[ 1 ] );
60 60
 
61 61
                 // If no sections, return the contents of the first item.
62
-                if ( ! $_aContent[ 0 ] ) {
62
+                if ( !$_aContent[ 0 ] ) {
63 63
                     return $_oParser->get();
64 64
                 }
65 65
 
66
-                $_aNestedSections[] = array(
67
-                    'section_id'        => 'faq_item_' . $_iIndex,
66
+                $_aNestedSections[ ] = array(
67
+                    'section_id'        => 'faq_item_'.$_iIndex,
68 68
                     'title'             => $_aContent[ 0 ],
69 69
                     'collapsible'       => array(
70 70
                         'toggle_all_button' => $_iLastIndex === $_iIndex
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
             return $_aNestedSections;
81 81
 
82 82
         }
83
-        private function getFAQContents()  {
83
+        private function getFAQContents() {
84 84
 
85
-            $_aReplacements   = array(
85
+            $_aReplacements = array(
86 86
                 '%PLUGIN_DIR_URL%'  => AdminPageFrameworkLoader_Registry::getPluginURL(),
87 87
                 '%WP_ADMIN_URL%'    => admin_url(),
88 88
             );
89 89
             $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser(
90
-                AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt',
90
+                AdminPageFrameworkLoader_Registry::$sDirPath.'/readme.txt',
91 91
                 $_aReplacements
92 92
             );
93 93
             return $_oWPReadmeParser->getRawSection( 'Frequently asked questions' );
Please login to merge, or discard this patch.
help/AdminPageFrameworkLoader_AdminPage_Help_Report_Report.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
      */
164 164
     public function validate( $aInput, $aOldInput, $oFactory, $aSubmit ) {
165 165
     
166
-       // Local variables
166
+        // Local variables
167 167
         $_bIsValid = true;
168 168
         $_aErrors  = array();
169 169
       
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                 'title'             => __( 'Your Name', 'admin-page-framework-loader' ),
30 30
                 'type'              => 'text',
31 31
                 'default'           => $_oCurrentUser->user_lastname || $_oCurrentUser->user_firstname
32
-                    ? $_oCurrentUser->user_lastname . ' ' .  $_oCurrentUser->user_lastname
32
+                    ? $_oCurrentUser->user_lastname.' '.$_oCurrentUser->user_lastname
33 33
                     : '',
34 34
                 'attributes'        => array(
35 35
                     'required'      => 'required',
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
             array(
113 113
                 'field_id'          => 'allow_sending_system_information',
114 114
                 'title'             => __( 'Confirmation', 'admin-page-framework-loader' )
115
-                    . ' (' . __( 'required', 'admin-page-framework-loader' ) . ')',
115
+                    . ' ('.__( 'required', 'admin-page-framework-loader' ).')',
116 116
                 'type'              => 'checkbox',
117 117
                 'label'             => __( 'I understand that the system information including a PHP version and WordPress version etc. will be sent along with the messages to help developer trouble-shoot the problem.', 'admin-page-framework-loader' ),
118 118
                 'attributes'        => array(
@@ -167,12 +167,12 @@  discard block
 block discarded – undo
167 167
         $_bIsValid = true;
168 168
         $_aErrors  = array();
169 169
       
170
-        if ( ! $aInput[ 'allow_sending_system_information' ] ) {
170
+        if ( !$aInput[ 'allow_sending_system_information' ] ) {
171 171
             $_bIsValid = false;
172 172
             $_aErrors[ 'allow_sending_system_information' ] = __( 'We need necessary information to help you.', 'admin-page-framework-loader' );
173 173
         }
174 174
         
175
-        if ( ! $_bIsValid ) {
175
+        if ( !$_bIsValid ) {
176 176
         
177 177
             $oFactory->setFieldErrors( $_aErrors );
178 178
             $oFactory->setSettingNotice( __( 'Please help us to help you.', 'admin-page-framework-loader' ) );
Please login to merge, or discard this patch.
include/class/admin/demo/AdminPageFrameworkLoader_Demo.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@
 block discarded – undo
9 9
  * @since        3.5.0
10 10
  */
11 11
 
12
- /**
13
-  * 
14
-  * 
15
-  * @action     do      admin_page_framework_loader_action_before_loading_demo
16
-  * @action     do      admin_page_framework_loader_action_after_loading_demo
17
-  */
12
+    /**
13
+     * 
14
+     * 
15
+     * @action     do      admin_page_framework_loader_action_before_loading_demo
16
+     * @action     do      admin_page_framework_loader_action_after_loading_demo
17
+     */
18 18
 class AdminPageFrameworkLoader_Demo {
19 19
     
20 20
     public function __construct() {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
     
20 20
     public function __construct() {
21 21
         
22
-        if ( ! $this->_shouldLoadDemo() ) {
22
+        if ( !$this->_shouldLoadDemo() ) {
23 23
             return;
24 24
         }
25 25
         
26 26
         do_action( 'admin_page_framework_loader_action_before_loading_demo' );
27 27
         
28 28
         // Include example components.
29
-        include( AdminPageFrameworkLoader_Registry::$sDirPath . '/example/admin-page-framework-demo-bootstrap.php' );
29
+        include( AdminPageFrameworkLoader_Registry::$sDirPath.'/example/admin-page-framework-demo-bootstrap.php' );
30 30
         
31 31
         do_action( 'admin_page_framework_loader_action_after_loading_demo' );
32 32
         
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
         
44 44
             // Check if the demo is enabled.
45 45
             $_oOption = AdminPageFrameworkLoader_Option::getInstance();
46
-            if ( ! $_oOption->get( 'enable_admin_pages' ) ) {
46
+            if ( !$_oOption->get( 'enable_admin_pages' ) ) {
47 47
                 return false;
48 48
             }            
49
-            if ( ! $_oOption->get( 'enable_demo' ) ) {
49
+            if ( !$_oOption->get( 'enable_demo' ) ) {
50 50
                 $this->_setPointerToolTips();
51 51
                 return false;
52 52
             }           
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 'options'   => array(
75 75
                     'content' => sprintf( '<h3> %1$s </h3> <p> %2$s </p>',
76 76
                         AdminPageFrameworkLoader_Registry::NAME,
77
-                        __( 'Check out the functionality of Admin Page Framework by enabling the demo.','admin-page-framework-loader' )
77
+                        __( 'Check out the functionality of Admin Page Framework by enabling the demo.', 'admin-page-framework-loader' )
78 78
                     ),
79 79
                     'position'  => array( 'edge' => 'left', 'align' => 'middle' )
80 80
                 )
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.