Completed
Branch dev (a3767f)
by Michael
40:38
created
help/AdminPageFrameworkLoader_AdminPage_Help_Example.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             
24 24
         $_aItems     = $this->getContentsByHeader( $this->getReadmeContents(), 3 );
25 25
         $_iLastIndex = count( $_aItems ) - 1;
26
-        foreach( $_aItems as $_iIndex => $_aContent ) {
26
+        foreach ( $_aItems as $_iIndex => $_aContent ) {
27 27
 
28 28
             $_oParser   = new AdminPageFramework_WPReadmeParser;
29 29
             $_oParser->setText( $_aContent[ 1 ] );
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             $oAdminPage->addSettingSections(    
32 32
                 $this->sPageSlug, // the target page slug  
33 33
                 array(
34
-                    'section_id'        => 'examples_' . $_iIndex,             
34
+                    'section_id'        => 'examples_'.$_iIndex,             
35 35
                     'title'             => $_aContent[ 0 ],
36 36
                     'collapsible'       => array(
37 37
                         'toggle_all_button' => $_iLastIndex === $_iIndex 
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
         /**
53 53
          * @return      string
54 54
          */
55
-        private function getReadMeContents()  {       
55
+        private function getReadMeContents() {       
56 56
             return $this->_getReadmeContents( 
57
-                AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/examples.txt',
57
+                AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/examples.txt',
58 58
                 '',
59 59
                 array( 'Examples' )
60 60
             );     
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         /**
53 53
          * @return      string
54 54
          */
55
-        private function getReadMeContents()  {       
55
+        private function getReadMeContents() {
56 56
             return $this->_getReadmeContents( 
57 57
                 AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/examples.txt',
58 58
                 '',
Please login to merge, or discard this patch.
admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_FAQ.php 2 patches
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.
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.
admin-page-framework/help/AdminPageFrameworkLoader_AdminPage_Help_Tip.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
             
26 26
         $_aItems     = $this->getContentsByHeader( $this->getReadmeContents(), 4 );
27 27
         $_iLastIndex = count( $_aItems ) - 1;
28
-        foreach( $_aItems as $_iIndex => $_aContent ) {
28
+        foreach ( $_aItems as $_iIndex => $_aContent ) {
29 29
 
30 30
             $_oParser   = new AdminPageFramework_WPReadmeParser( $_aContent[ 1 ] );
31 31
             $_sContent  = $_oParser->get();
32 32
             $oAdminPage->addSettingSections(    
33 33
                 $this->sPageSlug, // the target page slug  
34 34
                 array(
35
-                    'section_id'        => 'tips_' . $_iIndex,
35
+                    'section_id'        => 'tips_'.$_iIndex,
36 36
                     'title'             => $_aContent[ 0 ],
37 37
                     'collapsible'       => array(
38 38
                         'toggle_all_button' => $_iLastIndex === $_iIndex 
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
         /**
54 54
          * @return      string
55 55
          */
56
-        private function getReadMeContents()  {       
56
+        private function getReadMeContents() {       
57 57
             return $this->_getReadmeContents( 
58
-                AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt', // source path
58
+                AdminPageFrameworkLoader_Registry::$sDirPath.'/readme.txt', // source path
59 59
                 '', // TOC title
60 60
                 array( 'Other Notes' )  // sections
61 61
             );
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         /**
54 54
          * @return      string
55 55
          */
56
-        private function getReadMeContents()  {       
56
+        private function getReadMeContents() {
57 57
             return $this->_getReadmeContents( 
58 58
                 AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt', // source path
59 59
                 '', // TOC title
Please login to merge, or discard this patch.
include/class/admin/dashboard/AdminPageFrameworkLoader_AdminPageWelcome.php 1 patch
Spacing   +23 added lines, -23 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->_gotToWelcomePage(); // will exit
53 53
             }
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
             
73 73
         private function _gotToWelcomePage() {        
74 74
             $_sWelcomePageURL = apply_filters(
75
-                AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_admin_welcome_redirect_url',
75
+                AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_admin_welcome_redirect_url',
76 76
                 add_query_arg( 
77
-                    array( 'page' => AdminPageFrameworkLoader_Registry::$aAdminPages['about'] ),
77
+                    array( 'page' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ] ),
78 78
                     admin_url( 'index.php' )   // Dashboard
79 79
                 )                
80 80
             );
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      */
91 91
     public function setUp() {
92 92
         
93
-        $this->sPageSlug  = AdminPageFrameworkLoader_Registry::$aAdminPages['about'];
93
+        $this->sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ];
94 94
         
95 95
         // Root page
96 96
         $this->setRootMenuPage( 
@@ -101,20 +101,20 @@  discard block
 block discarded – undo
101 101
         $this->addSubMenuItems( 
102 102
             array(
103 103
                 'title'         => AdminPageFrameworkLoader_Registry::SHORTNAME,
104
-                'page_slug'     => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ],    // page slug
104
+                'page_slug'     => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], // page slug
105 105
                 'show_in_menu'  => false,
106 106
                 'style'         => array(
107
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/about.css', 
108
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/column.css', 
109
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/javascript/flip/jquery.m.flip.css',
110
-                    version_compare( $GLOBALS['wp_version'], '3.8', '<' )
107
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/about.css', 
108
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/column.css', 
109
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/javascript/flip/jquery.m.flip.css',
110
+                    version_compare( $GLOBALS[ 'wp_version' ], '3.8', '<' )
111 111
                         ? ".about-wrap .introduction h2 {
112 112
                                 padding: 1em;
113 113
                             }"
114 114
                         : "",
115 115
                 ),
116 116
                 'script'        => array(
117
-                    AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/javascript/flip/jquery.m.flip.js',
117
+                    AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/javascript/flip/jquery.m.flip.js',
118 118
                     "jQuery( document ).ready( function() {
119 119
                         jQuery( '.apf-badge-image' ).mflip();
120 120
                     } );",
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $this->setPluginSettingsLinkLabel( '' ); // pass an empty string to disable it.
130 130
            
131 131
         // Hook
132
-        add_action( "load_" . AdminPageFrameworkLoader_Registry::$aAdminPages['about'], array( $this, 'replyToLoadPage' ) );
132
+        add_action( "load_".AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], array( $this, 'replyToLoadPage' ) );
133 133
         
134 134
     }   
135 135
         
@@ -140,16 +140,16 @@  discard block
 block discarded – undo
140 140
          */
141 141
         public function replyToLoadPage( $oFactory ) {
142 142
             
143
-            $_sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages['about'];
143
+            $_sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ];
144 144
             new AdminPageFrameworkLoader_AdminPageWelcome_Welcome( 
145
-                $this,              // factory object
146
-                $_sPageSlug,        // page slug
145
+                $this, // factory object
146
+                $_sPageSlug, // page slug
147 147
                 array(
148 148
                     'tab_slug'      => 'welcome',
149 149
                     // 'title'         => __( "What's New", 'admin-page-framework-loader' ),   // '
150 150
                     'style'         => array(
151
-                        AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/admin.css',
152
-                        AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/code.css',
151
+                        AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/admin.css',
152
+                        AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/code.css',
153 153
                         ' .main-image, .main-image img { text-align: center; max-width: 90%; margin-left: auto; margin-right: auto; } ',
154 154
                     ),
155 155
                 )                
@@ -179,24 +179,24 @@  discard block
 block discarded – undo
179 179
      */
180 180
     public function replyToFilterContentTop( $sContent ) {
181 181
 
182
-        $_sVersion      = '- ' . AdminPageFrameworkLoader_Registry::VERSION;
183
-        $_sPluginName   = AdminPageFrameworkLoader_Registry::SHORTNAME . ' ' . $_sVersion;
182
+        $_sVersion      = '- '.AdminPageFrameworkLoader_Registry::VERSION;
183
+        $_sPluginName   = AdminPageFrameworkLoader_Registry::SHORTNAME.' '.$_sVersion;
184 184
         
185 185
         $_sBadgeURL     = esc_url( AdminPageFrameworkLoader_Registry::getPluginURL( 'asset/image/icon-128x128.png' ) );
186 186
         
187 187
         $_aOutput   = array();
188
-        $_aOutput[] = "<h1>" 
188
+        $_aOutput[ ] = "<h1>" 
189 189
                 . sprintf( __( 'Welcome to %1$s', 'admin-page-framework-loader' ), $_sPluginName )
190 190
             . "</h1>";
191
-        $_aOutput[] = "<div class='about-text'>"
191
+        $_aOutput[ ] = "<div class='about-text'>"
192 192
                 . 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 )
193 193
             . "</div>";
194
-        $_aOutput[] = ''
194
+        $_aOutput[ ] = ''
195 195
                 . "<div class='apf-badge'>"
196 196
                     . "<div class='apf-badge-image m-flip'>"
197 197
                         . "<img src='{$_sBadgeURL}' />"
198 198
                     . "</div>"
199
-                    . "<span class='label'>" . sprintf( __( 'Version %1$s', 'admin-page-framework-loader' ), $_sVersion ) . "</span>"
199
+                    . "<span class='label'>".sprintf( __( 'Version %1$s', 'admin-page-framework-loader' ), $_sVersion )."</span>"
200 200
                 . "</div>";
201 201
            
202 202
         return implode( PHP_EOL, $_aOutput )
Please login to merge, or discard this patch.