Completed
Branch master (bf4987)
by Michael
03:55
created
help/AdminPageFrameworkLoader_AdminPage_Help_Report_Report.php 2 patches
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.
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.
tool/generator/AdminPageFrameworkLoader_AdminPage_Tool_Generator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             $oAdminPage,
27 27
             $this->sPageSlug, 
28 28
             array(
29
-                'section_id'    => $this->sTabSlug,       // avoid hyphen(dash), dots, and white spaces
29
+                'section_id'    => $this->sTabSlug, // avoid hyphen(dash), dots, and white spaces
30 30
                 'tab_slug'      => $this->sTabSlug,
31 31
                 'title'         => __( 'Download Framework', 'admin-page-framework-loader' ),
32 32
                 'description'   => array(
Please login to merge, or discard this patch.
dashboard/welcome/AdminPageFrameworkLoader_AdminPageWelcome_Welcome.php 2 patches
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
                 'tab_slug'          => $this->sTabSlug,
30 30
                 'section_id'        => $this->sTabSlug,
31 31
                 'section_tab_slug'  => 'welcome',
32
-                'title'             => __( "What's New", 'admin-page-framework-loader' ),   // '
32
+                'title'             => __( "What's New", 'admin-page-framework-loader' ), // '
33 33
                 'content'           => $this->_getReadmeContents( 
34
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt',
34
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/about.txt',
35 35
                     '', // TOC title
36 36
                     array( 'New Features' ) // section
37 37
                 )
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
                 'tab_slug'          => $this->sTabSlug,
41 41
                 'section_tab_slug'  => $this->sTabSlug,
42 42
                 'section_id'        => 'getting_started',
43
-                'title'             => __( "Getting Started", 'admin-page-framework-loader' ),   // '
43
+                'title'             => __( "Getting Started", 'admin-page-framework-loader' ), // '
44 44
                 'content'           => $this->_getReadmeContents( 
45
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt', 
46
-                    "<h3>" . __( 'Contents', 'admin-page-framework-loader' ) . "</h3>", 
45
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/about.txt', 
46
+                    "<h3>".__( 'Contents', 'admin-page-framework-loader' )."</h3>", 
47 47
                     array( 'Getting Started', 'Tutorials' )
48 48
                 ),
49 49
             ),
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                 'tab_slug'          => $this->sTabSlug,
52 52
                 'section_tab_slug'  => $this->sTabSlug,
53 53
                 'section_id'        => 'change_log',
54
-                'title'             => __( "Change Log", 'admin-page-framework-loader' ),   // '
54
+                'title'             => __( "Change Log", 'admin-page-framework-loader' ), // '
55 55
                 'content'           => $this->_getChangeLog(),
56 56
             )             
57 57
         );
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
             array(
88 88
                 'field_id'      => 'github_star',
89 89
                 'type'          => 'github',     
90
-                'user_name'     => 'michaeluno',    // the GitHub account ID
91
-                'button_type'   => 'star',          // either of the followings: follow, star, watch, fork, issue
90
+                'user_name'     => 'michaeluno', // the GitHub account ID
91
+                'button_type'   => 'star', // either of the followings: follow, star, watch, fork, issue
92 92
                 'count'         => false,
93 93
                 'repository'    => 'admin-page-framework',
94 94
                 'size'          => 'mega',
95 95
                 'attributes'    => array(
96
-                    'data-text' => ' ' . AdminPageFramework_Registry::NAME . ' ' . AdminPageFramework_Registry::getVersion() . ' ',
96
+                    'data-text' => ' '.AdminPageFramework_Registry::NAME.' '.AdminPageFramework_Registry::getVersion().' ',
97 97
                     // 'data-icon' => 'octicon-mark-github',
98 98
                 ),
99 99
                 'description'   => __( 'Star the repository and get Involved!', 'admin-page-framework-loader' ),
@@ -133,26 +133,26 @@  discard block
 block discarded – undo
133 133
          * @since       3.6.1
134 134
          * @return      void
135 135
          */
136
-        private function _getChangeLog( $sSection='Changelog' ) {
136
+        private function _getChangeLog( $sSection = 'Changelog' ) {
137 137
             
138
-            $_aReplacements   = array(
138
+            $_aReplacements = array(
139 139
                 '%PLUGIN_DIR_URL%'  => AdminPageFrameworkLoader_Registry::getPluginURL(),
140 140
                 '%WP_ADMIN_URL%'    => admin_url(),
141 141
             );
142 142
             $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( 
143
-                AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt',
143
+                AdminPageFrameworkLoader_Registry::$sDirPath.'/readme.txt',
144 144
                 $_aReplacements
145 145
             );    
146 146
             $_sChangeLog = $_oWPReadmeParser->getSection( $sSection );  
147 147
             $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( 
148
-                AdminPageFrameworkLoader_Registry::$sDirPath . '/changelog.md',
148
+                AdminPageFrameworkLoader_Registry::$sDirPath.'/changelog.md',
149 149
                 $_aReplacements
150 150
             );    
151 151
             $_sChangeLog .= $_oWPReadmeParser->getSection( $sSection );  
152 152
                
153 153
             $_sChangeLog = $_sChangeLog
154 154
                 ? $_sChangeLog
155
-                : '<p>' . __( 'No valid changlog was found.', 'admin-page-framework-loader' ) . '</p>';
155
+                : '<p>'.__( 'No valid changlog was found.', 'admin-page-framework-loader' ).'</p>';
156 156
             return "<div class='changelog'>"
157 157
                 . $_sChangeLog
158 158
                 . "</div>";
@@ -183,18 +183,18 @@  discard block
 block discarded – undo
183 183
                 return '';
184 184
             }
185 185
         
186
-            $_aOutput   = array();
186
+            $_aOutput = array();
187 187
             foreach ( $_aContributors as $_oContributor ) {
188
-                $_aOutput[] = '<li class="wp-person">';
189
-                $_aOutput[] .= sprintf( '<a href="%s" title="%s">',
190
-                    esc_url( 'https://github.com/' . $_oContributor->login ),
188
+                $_aOutput[ ] = '<li class="wp-person">';
189
+                $_aOutput[ ] .= sprintf( '<a href="%s" title="%s">',
190
+                    esc_url( 'https://github.com/'.$_oContributor->login ),
191 191
                     esc_html( sprintf( __( 'View %s', 'admin-page-framework-loader' ), $_oContributor->login ) )
192 192
                 );
193
-                $_aOutput[] .= sprintf( '<img src="%s" width="64" height="64" class="gravatar" alt="%s" />', esc_url( $_oContributor->avatar_url ), esc_html( $_oContributor->login ) );
194
-                $_aOutput[] .= '</a>';
195
-                $_aOutput[] .= sprintf( '<a class="web" href="%s">%s</a>', esc_url( 'https://github.com/' . $_oContributor->login ), esc_html( $_oContributor->login ) );
196
-                $_aOutput[] .= '</a>';
197
-                $_aOutput[] .= '</li>';
193
+                $_aOutput[ ] .= sprintf( '<img src="%s" width="64" height="64" class="gravatar" alt="%s" />', esc_url( $_oContributor->avatar_url ), esc_html( $_oContributor->login ) );
194
+                $_aOutput[ ] .= '</a>';
195
+                $_aOutput[ ] .= sprintf( '<a class="web" href="%s">%s</a>', esc_url( 'https://github.com/'.$_oContributor->login ), esc_html( $_oContributor->login ) );
196
+                $_aOutput[ ] .= '</a>';
197
+                $_aOutput[ ] .= '</li>';
198 198
             }
199 199
 
200 200
             return '<ul class="wp-people-group">'
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 return $_aContributors;
219 219
             }
220 220
 
221
-            $_mResponse = wp_remote_get( $sRepositoryURL . '/contributors', array( 'sslverify' => false ) );
221
+            $_mResponse = wp_remote_get( $sRepositoryURL.'/contributors', array( 'sslverify' => false ) );
222 222
 
223 223
             if ( is_wp_error( $_mResponse ) || 200 != wp_remote_retrieve_response_code( $_mResponse ) ) {
224 224
                 return array();
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 
227 227
             $_aContributors = json_decode( wp_remote_retrieve_body( $_mResponse ) );
228 228
 
229
-            if ( ! is_array( $_aContributors ) )
229
+            if ( !is_array( $_aContributors ) )
230 230
                 return array();
231 231
 
232 232
             set_transient( 'apfl_contributors', $_aContributors, 3600 );
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -226,8 +226,9 @@
 block discarded – undo
226 226
 
227 227
             $_aContributors = json_decode( wp_remote_retrieve_body( $_mResponse ) );
228 228
 
229
-            if ( ! is_array( $_aContributors ) )
230
-                return array();
229
+            if ( ! is_array( $_aContributors ) ) {
230
+                            return array();
231
+            }
231 232
 
232 233
             set_transient( 'apfl_contributors', $_aContributors, 3600 );
233 234
 
Please login to merge, or discard this patch.
include/class/admin/network-admin/AdminPageFrameworkLoader_NetworkAdmin.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -18,19 +18,19 @@  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
-        if ( ! is_network_admin() ) {
24
+        if ( !is_network_admin() ) {
25 25
             return;
26 26
         }
27 27
           
28 28
         // Enable / disable the demo pages
29
-        if ( isset( $_GET['enable_apfl_demo_pages'] ) ) {
29
+        if ( isset( $_GET[ 'enable_apfl_demo_pages' ] ) ) {
30 30
             
31 31
             // Update the options and reload the page
32
-            $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys['main'] );
33
-            $_oOption->update( 'enable_demo', $_GET['enable_apfl_demo_pages'] );
32
+            $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ] );
33
+            $_oOption->update( 'enable_demo', $_GET[ 'enable_apfl_demo_pages' ] );
34 34
             exit( wp_safe_redirect( remove_query_arg( 'enable_apfl_demo_pages' ) ) );
35 35
             
36 36
         }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             $this->_getDemoSwitcherLink( $this->oProp->aOptions )
50 50
         );
51 51
         $this->addLinkToPluginDescription(
52
-            "<a href='https://wordpress.org/support/plugin/admin-page-framework' target='_blank'>" . __( 'Support', 'admin-page-framework-loader' ) . "</a>"
52
+            "<a href='https://wordpress.org/support/plugin/admin-page-framework' target='_blank'>".__( 'Support', 'admin-page-framework-loader' )."</a>"
53 53
         );
54 54
         
55 55
     }
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
         /**
58 58
          * Returns the switch link of the demo pages.
59 59
          */
60
-        private function _getDemoSwitcherLink( $mOptions=array() ) {
60
+        private function _getDemoSwitcherLink( $mOptions = array() ) {
61 61
             
62
-            $_bEnabled  = isset( $mOptions['enable_demo'] ) && $mOptions['enable_demo'];
63
-            $_sLink    = esc_url( 
62
+            $_bEnabled = isset( $mOptions[ 'enable_demo' ] ) && $mOptions[ 'enable_demo' ];
63
+            $_sLink = esc_url( 
64 64
                 add_query_arg( 
65 65
                     array( 
66 66
                         'enable_apfl_demo_pages' => $_bEnabled ? 0 : 1,
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
                 )
69 69
             );        
70 70
             return $_bEnabled
71
-                ? "<a href='{$_sLink}'>" . __( 'Disable Demo', 'admin-page-framework-loader' ) . "</a>"
72
-                : "<a href='{$_sLink}'><strong style='font-size: 1em;'>" . __( 'Enable Demo', 'admin-page-framework-loader' ) . "</strong></a>";
71
+                ? "<a href='{$_sLink}'>".__( 'Disable Demo', 'admin-page-framework-loader' )."</a>"
72
+                : "<a href='{$_sLink}'><strong style='font-size: 1em;'>".__( 'Enable Demo', 'admin-page-framework-loader' )."</strong></a>";
73 73
             
74 74
         }            
75 75
 
Please login to merge, or discard this patch.
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 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.
development/factory/meta_box/form/AdminPageFramework_Form_post_meta_box.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      * @since       DEVVER
28 28
      * @return      void
29 29
      */
30
-    public function construct() {        
30
+    public function construct() {
31 31
         $this->_addDefaultResources();
32 32
     }
33 33
 
Please login to merge, or discard this patch.