Completed
Branch dev (43e9e0)
by
unknown
06:03
created
class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Section_Base.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
             'tab_slug'      => '',
45 45
             'section_id'    => '',
46 46
         );
47
-        $this->sTabSlug     = $aSectionDefinition['tab_slug'];
48
-        $this->sSectionID   = $aSectionDefinition['section_id'];
47
+        $this->sTabSlug     = $aSectionDefinition[ 'tab_slug' ];
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.
class/admin/_abstract/AdminPageFrameworkLoader_AdminPage_Tab_Base.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
         
46 46
         $this->oFactory     = $oFactory;
47 47
         $this->sPageSlug    = $sPageSlug;
48
-        $this->sTabSlug     = isset( $aTabDefinition['tab_slug'] ) 
49
-            ? $aTabDefinition['tab_slug'] 
48
+        $this->sTabSlug     = isset( $aTabDefinition[ 'tab_slug' ] ) 
49
+            ? $aTabDefinition[ 'tab_slug' ] 
50 50
             : '';
51 51
         
52
-        if ( ! $this->sTabSlug ) {
52
+        if ( !$this->sTabSlug ) {
53 53
             return;
54 54
         }
55 55
         
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
             )
71 71
         );
72 72
             
73
-        if ( $aTabDefinition['tab_slug'] ) {
73
+        if ( $aTabDefinition[ 'tab_slug' ] ) {
74 74
             add_action( 
75
-                "load_{$sPageSlug}_{$aTabDefinition['tab_slug']}",
75
+                "load_{$sPageSlug}_{$aTabDefinition[ 'tab_slug' ]}",
76 76
                 array( $this, 'replyToLoadTab' ) 
77 77
             );
78 78
             add_action( 
Please login to merge, or discard this patch.
class/admin/admin-page-framework/AdminPageFrameworkLoader_AdminPage.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@  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
-            $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys['main'] );
30
-            $_oOption->update( 'enable_admin_pages', $_GET['enable_apfl_admin_pages'] );
31
-            if ( ! headers_sent() ) {
29
+            $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ] );
30
+            $_oOption->update( 'enable_admin_pages', $_GET[ 'enable_apfl_admin_pages' ] );
31
+            if ( !headers_sent() ) {
32 32
                 exit( wp_safe_redirect( remove_query_arg( 'enable_apfl_admin_pages' ) ) );
33 33
             } else {
34 34
                 new AdminPageFramework_AdminNotice( 'Header already sent. Could not be redirected after enabling the admin page.' );
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
         }
38 38
         
39 39
         // Enable / disable the demo pages
40
-        if ( isset( $_GET['enable_apfl_demo_pages'] ) ) {
40
+        if ( isset( $_GET[ 'enable_apfl_demo_pages' ] ) ) {
41 41
             
42 42
             // Update the options and reload the page
43
-            $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys['main'] );
44
-            $_oOption->update( 'enable_demo', $_GET['enable_apfl_demo_pages'] );            
45
-            if ( ! headers_sent() ) {
43
+            $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ] );
44
+            $_oOption->update( 'enable_demo', $_GET[ 'enable_apfl_demo_pages' ] );            
45
+            if ( !headers_sent() ) {
46 46
                 exit( wp_safe_redirect( remove_query_arg( 'enable_apfl_demo_pages' ) ) );
47 47
             } else {
48 48
                 new AdminPageFramework_AdminNotice( 'Header already sent. Could not be redirected after enabling the demo.' );
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
     public function setUp() {
60 60
 
61 61
         $_aOptions          = $this->oProp->aOptions;
62
-        $_bAdminPageEnabled = ! is_array( $_aOptions )  // for the first time of loading, the option is not set and it is not an array. 
63
-            || ( isset( $_aOptions['enable_admin_pages'] ) && $_aOptions['enable_admin_pages'] );    
62
+        $_bAdminPageEnabled = !is_array( $_aOptions )  // for the first time of loading, the option is not set and it is not an array. 
63
+            || ( isset( $_aOptions[ 'enable_admin_pages' ] ) && $_aOptions[ 'enable_admin_pages' ] );    
64 64
     
65 65
         // Set up pages
66 66
         if ( $_bAdminPageEnabled ) {
67 67
             
68 68
             $this->setRootMenuPage( 
69
-                AdminPageFrameworkLoader_Registry::SHORTNAME,     // menu slug
70
-                AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/image/wp-logo_16x16.png', // menu icon
69
+                AdminPageFrameworkLoader_Registry::SHORTNAME, // menu slug
70
+                AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/image/wp-logo_16x16.png', // menu icon
71 71
                 4  // menu position
72 72
             ); 
73 73
                         
@@ -75,21 +75,21 @@  discard block
 block discarded – undo
75 75
             new AdminPageFrameworkLoader_AdminPage_Tool( 
76 76
                 $this,
77 77
                 array(
78
-                    'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages['tool'],
78
+                    'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'tool' ],
79 79
                     'title'     => __( 'Tools', 'admin-page-framework-loader' ),
80 80
                 )
81 81
             );
82 82
             new AdminPageFrameworkLoader_AdminPage_Addon(
83 83
                 $this,
84 84
                 array(
85
-                    'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages['addon'],    // page slug
85
+                    'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'addon' ], // page slug
86 86
                     'title'     => __( 'Add Ons', 'admin-page-framework-loader' ),
87 87
                 )                
88 88
             );
89 89
             new AdminPageFrameworkLoader_AdminPage_Help( 
90 90
                 $this,
91 91
                 array(
92
-                    'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages['help'],
92
+                    'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'help' ],
93 93
                     'title'     => __( 'Help', 'admin-page-framework-loader' ),
94 94
                     'order'     => 1000, // to be the last menu item
95 95
                 )                
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
             $this->setPluginSettingsLinkLabel( '' ); // pass an empty string to disable it.
113 113
        
114 114
             // Styles
115
-            $this->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/code.css' );
116
-            $this->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/admin.css' );
115
+            $this->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/code.css' );
116
+            $this->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/admin.css' );
117 117
            
118 118
             // Action Links (plugin.php)
119 119
             $this->addLinkToPluginTitle(
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 $this->_getDemoSwitcherLink( $_bAdminPageEnabled, $_aOptions )
123 123
             );
124 124
             $this->addLinkToPluginDescription(
125
-                "<a href='https://wordpress.org/support/plugin/admin-page-framework' target='_blank'>" . __( 'Support', 'admin-page-framework-loader' ) . "</a>"
125
+                "<a href='https://wordpress.org/support/plugin/admin-page-framework' target='_blank'>".__( 'Support', 'admin-page-framework-loader' )."</a>"
126 126
             );            
127 127
             
128 128
         }
@@ -130,24 +130,24 @@  discard block
 block discarded – undo
130 130
          * Returns the Tools admin page link.
131 131
          */
132 132
         private function _getAdminURLTools( $_bAdminPageEnabled ) {
133
-            if ( ! $_bAdminPageEnabled ) {
133
+            if ( !$_bAdminPageEnabled ) {
134 134
                 return;
135 135
             }
136
-            $_sLink    = esc_url(
136
+            $_sLink = esc_url(
137 137
                 add_query_arg( 
138 138
                     array( 
139
-                        'page' => AdminPageFrameworkLoader_Registry::$aAdminPages['tool'],
139
+                        'page' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'tool' ],
140 140
                     ),
141 141
                     admin_url( 'admin.php' )
142 142
                 )
143 143
             );                
144
-            return "<a href='{$_sLink}'>" . __( 'Tools', 'admin-page-framework-loader' ) . "</a>";
144
+            return "<a href='{$_sLink}'>".__( 'Tools', 'admin-page-framework-loader' )."</a>";
145 145
         }
146 146
         /**
147 147
          * Returns the Enable /Disable Admin Pages link.
148 148
          */
149 149
         private function _getAdminPageSwitchLink( $bEnabled ) {
150
-            $_sLink    = esc_url( 
150
+            $_sLink = esc_url( 
151 151
                 add_query_arg( 
152 152
                     array( 
153 153
                         'enable_apfl_admin_pages' => $bEnabled ? 0 : 1,
@@ -155,19 +155,19 @@  discard block
 block discarded – undo
155 155
                 )
156 156
             );            
157 157
             return $bEnabled
158
-                ? "<a href='{$_sLink}'>" . __( 'Disable Admin Pages', 'admin-page-framework-loader' ) . "</a>"
159
-                : "<a href='{$_sLink}'>" . __( 'Enable Admin Pages', 'admin-page-framework-loader' ) . "</a>";                     
158
+                ? "<a href='{$_sLink}'>".__( 'Disable Admin Pages', 'admin-page-framework-loader' )."</a>"
159
+                : "<a href='{$_sLink}'>".__( 'Enable Admin Pages', 'admin-page-framework-loader' )."</a>";                     
160 160
         }
161 161
         /**
162 162
          * Returns the switch link of the demo pages.
163 163
          */
164
-        private function _getDemoSwitcherLink( $_bAdminPageEnabled, $mOptions=array() ) {
164
+        private function _getDemoSwitcherLink( $_bAdminPageEnabled, $mOptions = array() ) {
165 165
             
166
-            if ( ! $_bAdminPageEnabled ) {
166
+            if ( !$_bAdminPageEnabled ) {
167 167
                 return '';
168 168
             }
169
-            $_bEnabled  = isset( $mOptions['enable_demo'] ) && $mOptions['enable_demo'];
170
-            $_sLink    = esc_url( 
169
+            $_bEnabled = isset( $mOptions[ 'enable_demo' ] ) && $mOptions[ 'enable_demo' ];
170
+            $_sLink = esc_url( 
171 171
                 add_query_arg( 
172 172
                     array( 
173 173
                         'enable_apfl_demo_pages' => $_bEnabled ? 0 : 1,
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
                 )
176 176
             );        
177 177
             return $_bEnabled
178
-                ? "<a href='{$_sLink}'>" . __( 'Disable Demo', 'admin-page-framework-loader' ) . "</a>"
179
-                : "<a href='{$_sLink}'><strong style='font-size: 1em;'>" . __( 'Enable Demo', 'admin-page-framework-loader' ) . "</strong></a>";
178
+                ? "<a href='{$_sLink}'>".__( 'Disable Demo', 'admin-page-framework-loader' )."</a>"
179
+                : "<a href='{$_sLink}'><strong style='font-size: 1em;'>".__( 'Enable Demo', 'admin-page-framework-loader' )."</strong></a>";
180 180
             
181 181
         }            
182 182
 
Please login to merge, or discard this patch.
AdminPageFrameworkLoader_AdminPageMetaBox_ExternalLinks.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@
 block discarded – undo
24 24
      */
25 25
     public function content( $sContent ) {
26 26
         
27
-        $_aReplacements   = array(
27
+        $_aReplacements = array(
28 28
             '%PLUGIN_DIR_URL%'  => AdminPageFrameworkLoader_Registry::getPluginURL(),
29 29
             '%WP_ADMIN_URL%'    => admin_url(),
30 30
         );
31 31
         $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( 
32
-            AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt',
32
+            AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/about.txt',
33 33
             $_aReplacements
34 34
         );
35 35
         return ''
Please login to merge, or discard this patch.
AdminPageFrameworkLoader_AdminPageMetaBox_Notification.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     
28 28
     public function replyToDecideToLoad( $oScreen ) {
29 29
 
30
-        if ( ! $this->_isInThePage() ) {
30
+        if ( !$this->_isInThePage() ) {
31 31
             return;
32 32
         }
33 33
         
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         
39 39
         // Retrieve the development version.
40 40
         $this->_sDevelopmentVersion = $this->oUtil->getTransient( 
41
-            AdminPageFrameworkLoader_Registry::TRANSIENT_PREFIX . 'devver'
41
+            AdminPageFrameworkLoader_Registry::TRANSIENT_PREFIX.'devver'
42 42
         );
43 43
 
44 44
         // Disable the meta box if the development version is not above the running one.
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
          */
58 58
         private function _scheduleEvent() {
59 59
             
60
-            $_sActionName = AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_action_get_development_version';
60
+            $_sActionName = AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_action_get_development_version';
61 61
             $_aArguments  = array();
62 62
             if ( wp_next_scheduled( $_sActionName, $_aArguments ) ) {
63 63
                 return false; 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                 )
92 92
             . "</p>"
93 93
             . "<div style='width:100%; display:inline-block;'>"
94
-                . '<a href="' . esc_url( 'https://github.com/michaeluno/admin-page-framework/archive/dev.zip' ). '">'
94
+                . '<a href="'.esc_url( 'https://github.com/michaeluno/admin-page-framework/archive/dev.zip' ).'">'
95 95
                     . "<div class='button button-primary float-right'>"  
96 96
                         . __( 'Download', 'admin-page-framework-loader' )
97 97
                     . "</div>"            
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             . "</div>"
100 100
             ;
101 101
             
102
-        return $_sInsert . $sContent;        
102
+        return $_sInsert.$sContent;        
103 103
         
104 104
     }
105 105
  
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
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
     public function construct( $oFactory ) {
26 26
         
27 27
         new AdminPageFrameworkLoader_AdminPage_Addon_Top( 
28
-                $oFactory,        // factory object
29
-                $this->sPageSlug,       // page slug
28
+                $oFactory, // factory object
29
+                $this->sPageSlug, // page slug
30 30
                 array(                  // tab definition
31 31
                     'tab_slug'      => 'top',
32 32
                     'title'         => __( 'Add Ons', 'admin-page-framework-loader' ),
Please login to merge, or discard this patch.
admin-page-framework/addon/AdminPageFrameworkLoader_AdminPage_Addon_Top.php 2 patches
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
         // add_filter( 'wp_feed_cache_transient_lifetime', '__return_zero' );        
34 34
 
35 35
         // Styles
36
-        $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/column.css' );  
37
-        $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/feed-list.css' );  
36
+        $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/column.css' );  
37
+        $this->oFactory->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/feed-list.css' );  
38 38
         
39 39
         // $this->oFactory->setPageTitleVisibility( false );
40 40
         $this->oFactory->setInPageTabsVisibility( false );
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
     public function replyToDoTab() {
48 48
         
49 49
         $_oFeedList  = new AdminPageFrameworkLoader_FeedList( $this->sRSSURL );
50
-        $_aFeedItems = apply_filters( AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_admin_add_ons', $this->_getDemo() + $_oFeedList->get() );
50
+        $_aFeedItems = apply_filters( AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_admin_add_ons', $this->_getDemo() + $_oFeedList->get() );
51 51
         if ( empty( $_aFeedItems ) ) {
52
-            echo "<p>" . __( 'No add-on could be found.', 'admin-page-framework-loader' ) . "</p>";
52
+            echo "<p>".__( 'No add-on could be found.', 'admin-page-framework-loader' )."</p>";
53 53
             return;
54 54
         }        
55 55
         
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
         private function _getList( array $aFeedItems ) {
68 68
 
69 69
             $_aOutput       = array();
70
-            $_aColumnInfo   = array (    // this will be modified as the items get rendered
70
+            $_aColumnInfo   = array(    // this will be modified as the items get rendered
71 71
                 'bRowTagOpened'      => false,
72 72
                 'bRowTagClosed'      => false,
73 73
                 'iCurrRowPos'        => 0,
74 74
                 'iCurrColPos'        => 0,
75 75
             );            
76
-            $_aColumnOption = array (
76
+            $_aColumnOption = array(
77 77
                 'iMaxCols'           => 3,
78 78
                 'sClassAttr'         => 'apfl_columns',
79 79
                 'sClassAttrGroup'    => 'apfl_columns_box',
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
                 'sClassAttrFirstCol' => 'apfl_columns_first_col',
83 83
             );                
84 84
                 
85
-            $_sSiteURLWOQuery   = preg_replace( '/\?.*/', '', get_bloginfo( 'url' ) );
86
-            foreach( $aFeedItems as $_aItem ) {
87
-                $_aOutput[] = $this->_getFeedListItem( 
85
+            $_sSiteURLWOQuery = preg_replace( '/\?.*/', '', get_bloginfo( 'url' ) );
86
+            foreach ( $aFeedItems as $_aItem ) {
87
+                $_aOutput[ ] = $this->_getFeedListItem( 
88 88
                     ( array ) $_aItem, 
89 89
                     $_aColumnInfo, 
90 90
                     $_aColumnOption, 
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
             }
94 94
             
95 95
             // If the section (row) tag is not closed, close it.
96
-            if ( $_aColumnInfo[ 'bRowTagOpened' ] && ! $_aColumnInfo[ 'bRowTagClosed' ] ) { 
97
-                $_aOutput[] = '</div>';    
96
+            if ( $_aColumnInfo[ 'bRowTagOpened' ] && !$_aColumnInfo[ 'bRowTagClosed' ] ) { 
97
+                $_aOutput[ ] = '</div>';    
98 98
             }
99 99
             $_aColumnInfo[ 'bRowTagClosed' ] = true;
100 100
             
101 101
             // Enclose the output in the group tag
102 102
             return '<div class="apfl_addon_list_container">' 
103
-                    . '<div class="' . $_aColumnOption[ 'sClassAttr' ] . ' ' . $_aColumnOption[ 'sClassAttrGroup' ] . '">'
103
+                    . '<div class="'.$_aColumnOption[ 'sClassAttr' ].' '.$_aColumnOption[ 'sClassAttrGroup' ].'">'
104 104
                         . implode( '', $_aOutput )
105 105
                     . '</div>'
106 106
                 . '</div>';
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
              * Returns an HTML output from the given feed item array.
111 111
              * @return      string
112 112
              */
113
-            private function _getFeedListItem( array $aItem, array &$aColumnInfo, array $aColumnOption, $sSiteURLWOQuery='' ) {
113
+            private function _getFeedListItem( array $aItem, array &$aColumnInfo, array $aColumnOption, $sSiteURLWOQuery = '' ) {
114 114
                 
115 115
                 // Initial checks
116
-                if ( ! isset( $aItem[ 'title' ] ) ) { 
116
+                if ( !isset( $aItem[ 'title' ] ) ) { 
117 117
                     return ''; 
118 118
                 }
119 119
                 
@@ -139,20 +139,20 @@  discard block
 block discarded – undo
139 139
                 $_sTarget = '';
140 140
                 
141 141
                 // Enclose the item buffer into the item container
142
-                $_sItem = '<div class="' . $aColumnOption['sClassAttrCol'] 
143
-                    . ' apfl_col_element_of_' . $aColumnOption['iMaxCols'] . ' '
142
+                $_sItem = '<div class="'.$aColumnOption[ 'sClassAttrCol' ] 
143
+                    . ' apfl_col_element_of_'.$aColumnOption[ 'iMaxCols' ].' '
144 144
                     . ' apfl_extension '
145
-                    . ( ( 1 == $aColumnInfo['iCurrColPos'] ) ?  $aColumnOption['sClassAttrFirstCol']  : '' )
145
+                    . ( ( 1 == $aColumnInfo[ 'iCurrColPos' ] ) ? $aColumnOption[ 'sClassAttrFirstCol' ] : '' )
146 146
                     . '"'
147 147
                     . '>' 
148 148
                         . '<div class="apfl_addon_item">' 
149
-                            . "<h4 class='apfl_feed_item_title'>{$aItem['title']}</h4>"
149
+                            . "<h4 class='apfl_feed_item_title'>{$aItem[ 'title' ]}</h4>"
150 150
                             . "<div class='apfl_feed_item_description'>"
151
-                                . $aItem['description'] 
151
+                                . $aItem[ 'description' ] 
152 152
                             . "</div>"
153 153
                             . "<div class='get-now apfl_feed_item_link_button'>"
154
-                                . "<a href='" . esc_url( $aItem[ 'link' ] ) . "' target='{$_sTarget}' rel='nofollow' class='button button-secondary'>" 
155
-                                    . $aItem['label']
154
+                                . "<a href='".esc_url( $aItem[ 'link' ] )."' target='{$_sTarget}' rel='nofollow' class='button button-secondary'>" 
155
+                                    . $aItem[ 'label' ]
156 156
                                 . "</a>"
157 157
                             . "</div>"
158 158
                         . '</div>'
@@ -160,18 +160,18 @@  discard block
 block discarded – undo
160 160
                 
161 161
                 // If it's the first item in the row, add the class attribute. 
162 162
                 // Be aware that at this point, the tag will be unclosed. Therefore, it must be closed later at some point. 
163
-                if ( 1 == $aColumnInfo['iCurrColPos'] ) {
164
-                    $aColumnInfo['bRowTagOpened'] = true;
165
-                    $_sItem = '<div class="' . $aColumnOption['sClassAttrRow']  . '">' 
163
+                if ( 1 == $aColumnInfo[ 'iCurrColPos' ] ) {
164
+                    $aColumnInfo[ 'bRowTagOpened' ] = true;
165
+                    $_sItem = '<div class="'.$aColumnOption[ 'sClassAttrRow' ].'">' 
166 166
                         . $_sItem;
167 167
                 }
168 168
             
169 169
                 // If the current column position reached the set max column, increment the current position of row
170
-                if ( 0 === ( $aColumnInfo['iCurrColPos'] % $aColumnOption['iMaxCols'] ) ) {
171
-                    $aColumnInfo['iCurrRowPos']++;          // increment the row number
172
-                    $aColumnInfo['iCurrColPos'] = 0;        // reset the current column position
173
-                    $_sItem .= '</div>';  // close the section(row) div tag
174
-                    $aColumnInfo['bRowTagClosed'] = true;
170
+                if ( 0 === ( $aColumnInfo[ 'iCurrColPos' ] % $aColumnOption[ 'iMaxCols' ] ) ) {
171
+                    $aColumnInfo[ 'iCurrRowPos' ]++; // increment the row number
172
+                    $aColumnInfo[ 'iCurrColPos' ] = 0; // reset the current column position
173
+                    $_sItem .= '</div>'; // close the section(row) div tag
174
+                    $aColumnInfo[ 'bRowTagClosed' ] = true;
175 175
                 }        
176 176
                 return $_sItem;
177 177
                 
@@ -183,14 +183,14 @@  discard block
 block discarded – undo
183 183
          */
184 184
         private function _getDemo() {
185 185
             
186
-            $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys['main'] );
186
+            $_oOption = AdminPageFrameworkLoader_Option::getInstance( AdminPageFrameworkLoader_Registry::$aOptionKeys[ 'main' ] );
187 187
             $_bEnabled = $_oOption->get( 'enable_demo' );
188 188
             
189 189
             $_sTitle = __( 'Demo', 'admin=page-framework-loader' );
190 190
             return array( 
191 191
                 $_sTitle => array(
192 192
                     'title'         => $_sTitle,
193
-                    'description'   => '<div style="text-align: center;" class="aligncenter"><img class="aligncenter" src="' . AdminPageFrameworkLoader_Registry::getPluginURL( '/asset/image/icon-128x128.png' ) . '" alt="' . esc_attr( $_sTitle ) . '"/></div>'
193
+                    'description'   => '<div style="text-align: center;" class="aligncenter"><img class="aligncenter" src="'.AdminPageFrameworkLoader_Registry::getPluginURL( '/asset/image/icon-128x128.png' ).'" alt="'.esc_attr( $_sTitle ).'"/></div>'
194 194
                         . '<p>'
195 195
                             . __( 'Showcases the features of Admin Page Framework.', 'admin-page-framework-loader' )
196 196
                         . '</p>',
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
                                 ? 0 
201 201
                                 : 1,
202 202
                         ) + $_GET,
203
-                        admin_url( $GLOBALS['pagenow'] )
203
+                        admin_url( $GLOBALS[ 'pagenow' ] )
204 204
                     ),
205 205
                     'label'         => $_bEnabled
206 206
                         ? __( 'Deactivate', 'admin-page-framework-loader' )
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             }
94 94
             
95 95
             // If the section (row) tag is not closed, close it.
96
-            if ( $_aColumnInfo[ 'bRowTagOpened' ] && ! $_aColumnInfo[ 'bRowTagClosed' ] ) { 
96
+            if ( $_aColumnInfo[ 'bRowTagOpened' ] && ! $_aColumnInfo[ 'bRowTagClosed' ] ) {
97 97
                 $_aOutput[] = '</div>';    
98 98
             }
99 99
             $_aColumnInfo[ 'bRowTagClosed' ] = true;
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             private function _getFeedListItem( array $aItem, array &$aColumnInfo, array $aColumnOption, $sSiteURLWOQuery='' ) {
114 114
                 
115 115
                 // Initial checks
116
-                if ( ! isset( $aItem[ 'title' ] ) ) { 
116
+                if ( ! isset( $aItem[ 'title' ] ) ) {
117 117
                     return ''; 
118 118
                 }
119 119
                 
Please login to merge, or discard this patch.
admin/admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
         
24 24
         // Tabs
25 25
         new AdminPageFrameworkLoader_AdminPage_Help_Information(
26
-            $oFactory,    // factory object
27
-            $this->sPageSlug,   // page slug
26
+            $oFactory, // factory object
27
+            $this->sPageSlug, // page slug
28 28
             array(  // tab definition
29 29
                 'tab_slug'  => 'information',
30 30
                 'title'     => __( 'Support', 'admin-page-framework-loader' ),             
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
                 'title'         => __( 'Getting Started', 'admin-page-framework-loader' ),
39 39
                 'url'           => add_query_arg( 
40 40
                     array( 
41
-                        'page'  => AdminPageFrameworkLoader_Registry::$aAdminPages['about'],
41
+                        'page'  => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ],
42 42
                         // 'tab'   => 'guide',
43 43
                     ),
44 44
                     admin_url( 'index.php' )   // Dashboard
45
-                ) . '#section-getting_started__'
45
+                ).'#section-getting_started__'
46 46
             )                          
47 47
         );                 
48 48
         new AdminPageFrameworkLoader_AdminPage_Help_Tip(
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 'title'     => __( 'About', 'admin-page-framework-loader' ),
86 86
                 'url'       => add_query_arg( 
87 87
                     array( 
88
-                        'page' => AdminPageFrameworkLoader_Registry::$aAdminPages['about']
88
+                        'page' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ]
89 89
                     ),
90 90
                     admin_url( 'index.php' )   // Dashboard
91 91
                 )           
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         add_action( "do_after_{$this->sPageSlug}", array( $this, 'replyToDoAfterPage' ) );    
116 116
         
117 117
         $oFactory->enqueueStyle( 
118
-            AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/help.css', 
118
+            AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/help.css', 
119 119
             $this->sPageSlug
120 120
         );
121 121
         
Please login to merge, or discard this patch.
admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Debug.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     
35 35
     public function replyToDoTab( $oFactory ) {
36 36
         
37
-        echo "<h3>" . __( 'Saved Options', 'admin-page-framework-loader' ) . "</h3>";
37
+        echo "<h3>".__( 'Saved Options', 'admin-page-framework-loader' )."</h3>";
38 38
         $oFactory->oDebug->dump( $oFactory->oProp->aOptions );
39 39
         
40 40
     }
Please login to merge, or discard this patch.