@@ -34,7 +34,7 @@ |
||
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 | } |
@@ -19,8 +19,8 @@ |
||
19 | 19 | public function replyToDoTab() { |
20 | 20 | |
21 | 21 | echo $this->_getReadmeContents( |
22 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/examples.txt', |
|
23 | - "<h3>" . __( 'Examples', 'admin-page-framework-loader' ) . "</h3>", |
|
22 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/text/examples.txt', |
|
23 | + "<h3>".__( 'Examples', 'admin-page-framework-loader' )."</h3>", |
|
24 | 24 | array( 'Examples' ) |
25 | 25 | ); |
26 | 26 |
@@ -22,11 +22,11 @@ discard block |
||
22 | 22 | public function replyToLoadTab( $oAdminPage ) { |
23 | 23 | |
24 | 24 | $_aFAQs = array(); |
25 | - foreach( $this->getContentsByHeader( $this->getFAQContents(), 4 ) as $_aContent ) { |
|
25 | + foreach ( $this->getContentsByHeader( $this->getFAQContents(), 4 ) as $_aContent ) { |
|
26 | 26 | $_aFAQs = array_merge( $_aFAQs, $this->getContentsByHeader( $_aContent[ 1 ], 5 ) ); |
27 | 27 | } |
28 | 28 | $_iLastIndex = count( $_aFAQs ) - 1; |
29 | - foreach( $_aFAQs as $_iIndex => $_aContent ) { |
|
29 | + foreach ( $_aFAQs as $_iIndex => $_aContent ) { |
|
30 | 30 | |
31 | 31 | $_oParser = new AdminPageFramework_WPReadmeParser; |
32 | 32 | $_oParser->setText( $_aContent[ 1 ] ); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $oAdminPage->addSettingSections( |
35 | 35 | $this->sPageSlug, // the target page slug |
36 | 36 | array( |
37 | - 'section_id' => 'faq_items_' . $_iIndex, |
|
37 | + 'section_id' => 'faq_items_'.$_iIndex, |
|
38 | 38 | 'tab_slug' => $this->sTabSlug, |
39 | 39 | 'title' => $_aContent[ 0 ], |
40 | 40 | 'collapsible' => array( |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | ) |
49 | 49 | ); |
50 | 50 | $oAdminPage->addSettingFields( |
51 | - 'faq_items_' . $_iIndex , // the target section ID |
|
51 | + 'faq_items_'.$_iIndex, // the target section ID |
|
52 | 52 | array( |
53 | - 'field_id' => 'faq', // non-existent field type |
|
53 | + 'field_id' => 'faq', // non-existent field type |
|
54 | 54 | 'type' => 'faq', |
55 | 55 | 'show_title_column' => false, |
56 | 56 | 'before_field' => $_sContent, |
@@ -66,14 +66,14 @@ discard block |
||
66 | 66 | |
67 | 67 | } |
68 | 68 | |
69 | - private function getFAQContents() { |
|
69 | + private function getFAQContents() { |
|
70 | 70 | |
71 | - $_aReplacements = array( |
|
71 | + $_aReplacements = array( |
|
72 | 72 | '%PLUGIN_DIR_URL%' => AdminPageFrameworkLoader_Registry::getPluginURL(), |
73 | 73 | '%WP_ADMIN_URL%' => admin_url(), |
74 | 74 | ); |
75 | 75 | $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( |
76 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt', |
|
76 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/readme.txt', |
|
77 | 77 | $_aReplacements |
78 | 78 | ); |
79 | 79 | return $_oWPReadmeParser->getRawSection( 'Frequently asked questions' ); |
@@ -94,27 +94,27 @@ discard block |
||
94 | 94 | * array( 'Second Heading' => 'Another text', ), |
95 | 95 | * ) |
96 | 96 | */ |
97 | - private function getContentsByHeader( $sContents, $iHeaderNumber=2 ) { |
|
97 | + private function getContentsByHeader( $sContents, $iHeaderNumber = 2 ) { |
|
98 | 98 | |
99 | 99 | $_aContents = array(); |
100 | 100 | $_aSplitContents = preg_split( |
101 | 101 | // '/^[\s]*==[\s]*(.+?)[\s]*==/m', |
102 | - '/(<h[' . $iHeaderNumber . ']*[^>]*>.*?<\/h[' . $iHeaderNumber . ']>)/i', |
|
102 | + '/(<h['.$iHeaderNumber.']*[^>]*>.*?<\/h['.$iHeaderNumber.']>)/i', |
|
103 | 103 | $sContents, |
104 | 104 | -1, |
105 | - PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY |
|
105 | + PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY |
|
106 | 106 | ); |
107 | 107 | |
108 | - foreach( $_aSplitContents as $_iIndex => $_sSplitContent ) { |
|
109 | - if ( ! preg_match( '/<h[' . $iHeaderNumber . ']*[^>]*>(.*?)<\/h[' . $iHeaderNumber . ']>/i', $_sSplitContent , $_aMatches ) ) { |
|
108 | + foreach ( $_aSplitContents as $_iIndex => $_sSplitContent ) { |
|
109 | + if ( !preg_match( '/<h['.$iHeaderNumber.']*[^>]*>(.*?)<\/h['.$iHeaderNumber.']>/i', $_sSplitContent, $_aMatches ) ) { |
|
110 | 110 | continue; |
111 | 111 | } |
112 | 112 | |
113 | - if ( ! isset( $_aMatches[ 1 ] ) ) { |
|
113 | + if ( !isset( $_aMatches[ 1 ] ) ) { |
|
114 | 114 | continue; |
115 | 115 | } |
116 | - if ( isset( $_aSplitContents[ $_iIndex + 1 ] ) ) { |
|
117 | - $_aContents[] = array( |
|
116 | + if ( isset( $_aSplitContents[ $_iIndex + 1 ] ) ) { |
|
117 | + $_aContents[ ] = array( |
|
118 | 118 | $_aMatches[ 1 ], |
119 | 119 | $_aSplitContents[ $_iIndex + 1 ] |
120 | 120 | ); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | } |
68 | 68 | |
69 | - private function getFAQContents() { |
|
69 | + private function getFAQContents() { |
|
70 | 70 | |
71 | 71 | $_aReplacements = array( |
72 | 72 | '%PLUGIN_DIR_URL%' => AdminPageFrameworkLoader_Registry::getPluginURL(), |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | if ( ! isset( $_aMatches[ 1 ] ) ) { |
114 | 114 | continue; |
115 | 115 | } |
116 | - if ( isset( $_aSplitContents[ $_iIndex + 1 ] ) ) { |
|
116 | + if ( isset( $_aSplitContents[ $_iIndex + 1 ] ) ) { |
|
117 | 117 | $_aContents[] = array( |
118 | 118 | $_aMatches[ 1 ], |
119 | 119 | $_aSplitContents[ $_iIndex + 1 ] |
@@ -21,8 +21,8 @@ |
||
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 |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Admin Page Framework Loader |
|
4 | - * |
|
5 | - * http://en.michaeluno.jp/admin-page-framework/ |
|
6 | - * Copyright (c) 2013-2015 Michael Uno; Licensed GPLv2 |
|
7 | - */ |
|
3 | + * Admin Page Framework Loader |
|
4 | + * |
|
5 | + * http://en.michaeluno.jp/admin-page-framework/ |
|
6 | + * Copyright (c) 2013-2015 Michael Uno; Licensed GPLv2 |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * Adds the 'Report' form section to the 'Report' tab. |
@@ -163,7 +163,7 @@ discard block |
||
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 |
@@ -29,7 +29,7 @@ discard block |
||
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 |
||
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 |
||
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' ) ); |
@@ -21,8 +21,8 @@ |
||
21 | 21 | public function replyToDoTab() { |
22 | 22 | |
23 | 23 | echo $this->_getReadmeContents( |
24 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt', |
|
25 | - "<h3>" . __( 'Tips', 'admin-page-framework-loader' ) . "</h3>", |
|
24 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/readme.txt', |
|
25 | + "<h3>".__( 'Tips', 'admin-page-framework-loader' )."</h3>", |
|
26 | 26 | array( 'Other Notes' ) |
27 | 27 | ); |
28 | 28 |
@@ -26,7 +26,7 @@ |
||
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( |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | 'class_name' => 'AceCustomFieldType', |
87 | 87 | 'label' => __( 'ACE', 'admin-page-framework-loader' ), |
88 | 88 | 'description' => __( 'provides code syntax highlighting in a text area field.', 'admin-page-framework-loader' ), |
89 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/ace-custom-field-type', |
|
89 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/ace-custom-field-type', |
|
90 | 90 | 'archive_file_path' => 'custom-field-types/ace-custom-field-type/AceCustomFieldType.php', |
91 | 91 | 'archive_dir_path' => 'custom-field-types/ace-custom-field-type', |
92 | 92 | ), |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | 'class_name' => 'GitHubCustomFieldType', |
95 | 95 | 'label' => __( 'GitHub Buttons', 'admin-page-framework-loader' ), |
96 | 96 | 'description' => __( 'allows you to display GitHub buttons in a field.', 'admin-page-framework-loader' ), |
97 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/include/library/github-custom-field-type', |
|
97 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/include/library/github-custom-field-type', |
|
98 | 98 | 'archive_file_path' => 'custom-field-types/github-custom-field-type/GitHubCustomFieldType.php', |
99 | 99 | 'archive_dir_path' => 'custom-field-types/github-custom-field-type', |
100 | 100 | ), |
@@ -102,13 +102,13 @@ discard block |
||
102 | 102 | |
103 | 103 | // Let third-party scripts add custom field types. |
104 | 104 | $this->aCustomFieldTypes = apply_filters( |
105 | - AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_custom_field_types', |
|
105 | + AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_custom_field_types', |
|
106 | 106 | $this->aCustomFieldTypes |
107 | 107 | ); |
108 | 108 | |
109 | - foreach( $this->aCustomFieldTypes as $_sKey => $_aCustomFieldType ) { |
|
109 | + foreach ( $this->aCustomFieldTypes as $_sKey => $_aCustomFieldType ) { |
|
110 | 110 | $this->aCustomFieldTypeLabels[ $_sKey ] = $_aCustomFieldType[ 'label' ] |
111 | - . ' - <span class="description">' . $_aCustomFieldType[ 'description' ] . '</span>'; |
|
111 | + . ' - <span class="description">'.$_aCustomFieldType[ 'description' ].'</span>'; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | public function replyToModifyFileContents( $sFileContents, $sPathInArchive, $aFormData, $oFactory ) { |
122 | 122 | |
123 | 123 | // Check the file extension. |
124 | - if ( ! in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), array( 'php', 'css', 'js' ) ) ) { |
|
124 | + if ( !in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), array( 'php', 'css', 'js' ) ) ) { |
|
125 | 125 | return $sFileContents; |
126 | 126 | } |
127 | 127 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | private function _getModifiedInclusionList( $sFileContents ) { |
152 | 152 | return str_replace( |
153 | 153 | ');', // search |
154 | - $this->_getClassListOfCustomFieldTypes() . ');', // replace - @todo insert the selected class list here |
|
154 | + $this->_getClassListOfCustomFieldTypes().');', // replace - @todo insert the selected class list here |
|
155 | 155 | $sFileContents // subject |
156 | 156 | ); |
157 | 157 | } |
@@ -174,12 +174,12 @@ discard block |
||
174 | 174 | '' |
175 | 175 | ); |
176 | 176 | $_aOutput = array(); |
177 | - foreach( $_aCheckedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
178 | - $_aOutput[] = ' "' . $_sClassPrefix . $_sClassName . '"' |
|
177 | + foreach ( $_aCheckedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
178 | + $_aOutput[ ] = ' "'.$_sClassPrefix.$_sClassName.'"' |
|
179 | 179 | . ' => ' |
180 | - . 'AdminPageFramework_Registry::$sDirPath . ' . '"/' . ltrim( $_aCustomFieldType[ 'archive_file_path' ], '/' ) . '",'; |
|
180 | + . 'AdminPageFramework_Registry::$sDirPath . '.'"/'.ltrim( $_aCustomFieldType[ 'archive_file_path' ], '/' ).'",'; |
|
181 | 181 | } |
182 | - return implode( PHP_EOL, $_aOutput ) . PHP_EOL; |
|
182 | + return implode( PHP_EOL, $_aOutput ).PHP_EOL; |
|
183 | 183 | |
184 | 184 | } |
185 | 185 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $this->aCustomFieldTypes // ArchiveFilePaths |
195 | 195 | ); |
196 | 196 | $_aArchiveFilePaths = array(); |
197 | - foreach( $_aSelectedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
197 | + foreach ( $_aSelectedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
198 | 198 | $_aArchiveFilePaths[ $_sClassName ] = $this->oFactory->oUtil->getElement( |
199 | 199 | $_aCustomFieldType, |
200 | 200 | 'archive_file_path', |
@@ -238,8 +238,8 @@ discard block |
||
238 | 238 | $_aReplaces = $_aPrefixedClassNames; |
239 | 239 | |
240 | 240 | // Change the text domain. |
241 | - $_aSearches[] = 'admin-page-framework'; |
|
242 | - $_aReplaces[] = $this->oFactory->oUtil->getElement( |
|
241 | + $_aSearches[ ] = 'admin-page-framework'; |
|
242 | + $_aReplaces[ ] = $this->oFactory->oUtil->getElement( |
|
243 | 243 | $_POST, |
244 | 244 | array( |
245 | 245 | $this->oFactory->oProp->sOptionKey, |
@@ -261,8 +261,8 @@ discard block |
||
261 | 261 | * @since 3.6.0 |
262 | 262 | * @callback function array_walk |
263 | 263 | */ |
264 | - public function _replyToSetPrefix( &$sClassName, $sKey, $sPrefix='' ) { |
|
265 | - $sClassName = $sPrefix . $sClassName; |
|
264 | + public function _replyToSetPrefix( &$sClassName, $sKey, $sPrefix = '' ) { |
|
265 | + $sClassName = $sPrefix.$sClassName; |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | |
@@ -283,12 +283,12 @@ discard block |
||
283 | 283 | */ |
284 | 284 | public function replyToSetAdditionalDirectoriesForGenerator( $aDirPaths ) { |
285 | 285 | |
286 | - $_aCheckedCustomFieldTypes = $this->_getSelectedCustomFieldTypes( |
|
286 | + $_aCheckedCustomFieldTypes = $this->_getSelectedCustomFieldTypes( |
|
287 | 287 | $this->aCustomFieldTypes |
288 | 288 | ); |
289 | 289 | |
290 | 290 | $_aDirPathInfo = array(); |
291 | - foreach( $_aCheckedCustomFieldTypes as $_sKey => $_aCheckedCustomFieldType ) { |
|
291 | + foreach ( $_aCheckedCustomFieldTypes as $_sKey => $_aCheckedCustomFieldType ) { |
|
292 | 292 | |
293 | 293 | $_sArchiveDirPath = $this->oFactory->oUtil->getElement( $_aCheckedCustomFieldType, 'archive_dir_path' ); |
294 | 294 | $_sSourceDirPath = $this->oFactory->oUtil->getElement( $_aCheckedCustomFieldType, 'directory_path' ); |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | * @return array The array keys of the checked items. |
305 | 305 | * @since 3.6.0 |
306 | 306 | */ |
307 | - private function _getSelectedCustomFieldTypes( array $aSubject=array() ) { |
|
307 | + private function _getSelectedCustomFieldTypes( array $aSubject = array() ) { |
|
308 | 308 | |
309 | 309 | $_aCheckedCustomFieldTypes = $this->oFactory->oUtil->getElementAsArray( |
310 | 310 | $_POST, |
@@ -25,7 +25,7 @@ discard block |
||
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 |
||
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 |
||
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 | ); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function setUp() { |
90 | 90 | |
91 | - $this->sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages['about']; |
|
91 | + $this->sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ]; |
|
92 | 92 | |
93 | 93 | // Root page |
94 | 94 | $this->setRootMenuPage( |
@@ -99,20 +99,20 @@ discard block |
||
99 | 99 | $this->addSubMenuItems( |
100 | 100 | array( |
101 | 101 | 'title' => AdminPageFrameworkLoader_Registry::SHORTNAME, |
102 | - 'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], // page slug |
|
102 | + 'page_slug' => AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], // page slug |
|
103 | 103 | 'show_in_menu' => false, |
104 | 104 | 'style' => array( |
105 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/about.css', |
|
106 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/column.css', |
|
107 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/javascript/flip/jquery.m.flip.css', |
|
108 | - version_compare( $GLOBALS['wp_version'], '3.8', '<' ) |
|
105 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/about.css', |
|
106 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/column.css', |
|
107 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/javascript/flip/jquery.m.flip.css', |
|
108 | + version_compare( $GLOBALS[ 'wp_version' ], '3.8', '<' ) |
|
109 | 109 | ? ".about-wrap .introduction h2 { |
110 | 110 | padding: 1em; |
111 | 111 | }" |
112 | 112 | : "", |
113 | 113 | ), |
114 | 114 | 'script' => array( |
115 | - AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/javascript/flip/jquery.m.flip.js', |
|
115 | + AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/javascript/flip/jquery.m.flip.js', |
|
116 | 116 | "jQuery( document ).ready( function() { |
117 | 117 | jQuery( '.apf-badge-image' ).mflip(); |
118 | 118 | } );", |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | $this->setPluginSettingsLinkLabel( '' ); // pass an empty string to disable it. |
128 | 128 | |
129 | 129 | // Styles |
130 | - $this->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/code.css' ); |
|
131 | - $this->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/css/admin.css' ); |
|
130 | + $this->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/code.css' ); |
|
131 | + $this->enqueueStyle( AdminPageFrameworkLoader_Registry::$sDirPath.'/asset/css/admin.css' ); |
|
132 | 132 | |
133 | 133 | // Hook |
134 | - add_action( "load_" . AdminPageFrameworkLoader_Registry::$aAdminPages['about'], array( $this, 'replyToLoadPage' ) ); |
|
134 | + add_action( "load_".AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ], array( $this, 'replyToLoadPage' ) ); |
|
135 | 135 | |
136 | 136 | } |
137 | 137 | |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | */ |
143 | 143 | public function replyToLoadPage( $oFactory ) { |
144 | 144 | |
145 | - $_sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages['about']; |
|
145 | + $_sPageSlug = AdminPageFrameworkLoader_Registry::$aAdminPages[ 'about' ]; |
|
146 | 146 | new AdminPageFrameworkLoader_AdminPageWelcome_Welcome( |
147 | - $this, // factory object |
|
148 | - $_sPageSlug, // page slug |
|
147 | + $this, // factory object |
|
148 | + $_sPageSlug, // page slug |
|
149 | 149 | array( |
150 | 150 | 'tab_slug' => 'welcome', |
151 | 151 | // 'title' => __( "What's New", 'admin-page-framework-loader' ), // ' |
@@ -176,25 +176,25 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function replyToFilterContentTop( $sContent ) { |
178 | 178 | |
179 | - $_sVersion = '- ' . AdminPageFrameworkLoader_Registry::VERSION; |
|
180 | - $_sPluginName = AdminPageFrameworkLoader_Registry::SHORTNAME . ' ' . $_sVersion; |
|
179 | + $_sVersion = '- '.AdminPageFrameworkLoader_Registry::VERSION; |
|
180 | + $_sPluginName = AdminPageFrameworkLoader_Registry::SHORTNAME.' '.$_sVersion; |
|
181 | 181 | |
182 | 182 | $_sBadgeURL = esc_url( AdminPageFrameworkLoader_Registry::getPluginURL( 'asset/image/icon-128x128.png' ) ); |
183 | 183 | |
184 | 184 | $_aOutput = array(); |
185 | - $_aOutput[] = "<h1>" |
|
185 | + $_aOutput[ ] = "<h1>" |
|
186 | 186 | . sprintf( __( 'Welcome to %1$s', 'admin-page-framework-loader' ), $_sPluginName ) |
187 | 187 | . "</h1>"; |
188 | - $_aOutput[] = "<div class='about-text'>" |
|
188 | + $_aOutput[ ] = "<div class='about-text'>" |
|
189 | 189 | . 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 ) |
190 | 190 | . "</div>"; |
191 | - $_aOutput[] = '' |
|
191 | + $_aOutput[ ] = '' |
|
192 | 192 | // . "<div class='apf-badge-container m-flip'>" |
193 | 193 | . "<div class='apf-badge'>" |
194 | 194 | . "<div class='apf-badge-image m-flip'>" |
195 | 195 | . "<img src='{$_sBadgeURL}' />" |
196 | 196 | . "</div>" |
197 | - . "<span class='label'>" . sprintf( __( 'Version %1$s', 'admin-page-framework-loader' ), $_sVersion ) . "</span>" |
|
197 | + . "<span class='label'>".sprintf( __( 'Version %1$s', 'admin-page-framework-loader' ), $_sVersion )."</span>" |
|
198 | 198 | . "</div>" |
199 | 199 | // . "</div>" |
200 | 200 | ; |
@@ -47,7 +47,7 @@ discard block |
||
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 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | } |
72 | 72 | |
73 | - private function _gotToWelcomePage() { |
|
73 | + private function _gotToWelcomePage() { |
|
74 | 74 | $_sWelcomePageURL = apply_filters( |
75 | 75 | AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_admin_welcome_redirect_url', |
76 | 76 | add_query_arg( |