@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | 'class_name' => 'AceCustomFieldType', |
89 | 89 | 'label' => __( 'ACE', 'admin-page-framework-loader' ), |
90 | 90 | 'description' => __( 'provides code syntax highlighting in a text area field.', 'admin-page-framework-loader' ), |
91 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/ace-custom-field-type', |
|
91 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/ace-custom-field-type', |
|
92 | 92 | 'archive_file_path' => 'custom-field-types/ace-custom-field-type/AceCustomFieldType.php', |
93 | 93 | 'archive_dir_path' => 'custom-field-types/ace-custom-field-type', |
94 | 94 | 'text_domain' => 'admin-page-framework', |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | 'class_name' => 'GitHubCustomFieldType', |
98 | 98 | 'label' => __( 'GitHub Buttons', 'admin-page-framework-loader' ), |
99 | 99 | 'description' => __( 'allows you to display GitHub buttons in a field.', 'admin-page-framework-loader' ), |
100 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/include/library/github-custom-field-type', |
|
100 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/include/library/github-custom-field-type', |
|
101 | 101 | 'archive_file_path' => 'custom-field-types/github-custom-field-type/GitHubCustomFieldType.php', |
102 | 102 | 'archive_dir_path' => 'custom-field-types/github-custom-field-type', |
103 | 103 | 'text_domain' => 'admin-page-framework', |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | 'class_name' => 'PathCustomFieldType', |
107 | 107 | 'label' => __( 'Path', 'admin-page-framework-loader' ), |
108 | 108 | 'description' => __( 'allows the user to select a file path on the server.', 'admin-page-framework-loader' ), |
109 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/path-custom-field-type', |
|
109 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/path-custom-field-type', |
|
110 | 110 | 'archive_file_path' => 'custom-field-types/path-custom-field-type/PathCustomFieldType.php', |
111 | 111 | 'archive_dir_path' => 'custom-field-types/path-custom-field-type', |
112 | 112 | 'text_domain' => 'admin-page-framework', |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | 'class_name' => 'ToggleCustomFieldType', |
116 | 116 | 'label' => __( 'Toggle', 'admin-page-framework-loader' ), |
117 | 117 | 'description' => __( 'allows the user to switch a button.', 'admin-page-framework-loader' ), |
118 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/toggle-custom-field-type', |
|
118 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/toggle-custom-field-type', |
|
119 | 119 | 'archive_file_path' => 'custom-field-types/toggle-custom-field-type/ToggleCustomFieldType.php', |
120 | 120 | 'archive_dir_path' => 'custom-field-types/toggle-custom-field-type', |
121 | 121 | 'text_domain' => 'admin-page-framework', |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | 'class_name' => 'NoUISliderCustomFieldType', |
125 | 125 | 'label' => __( 'NoUISlider (Range Slider)', 'admin-page-framework-loader' ), |
126 | 126 | 'description' => __( 'allows the user to set values in ranges.', 'admin-page-framework-loader' ), |
127 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/nouislider-custom-field-type', |
|
127 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/nouislider-custom-field-type', |
|
128 | 128 | 'archive_file_path' => 'custom-field-types/nouislider-custom-field-type/NoUISliderCustomFieldType.php', |
129 | 129 | 'archive_dir_path' => 'custom-field-types/nouislider-custom-field-type', |
130 | 130 | 'text_domain' => 'admin-page-framework', |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | 'class_name' => 'Select2CustomFieldType', |
134 | 134 | 'label' => __( 'Select2', 'admin-page-framework-loader' ), |
135 | 135 | 'description' => __( 'allows the user to select items with autocomplete from a list which can be populated with AJAX.', 'admin-page-framework-loader' ), |
136 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/select2-custom-field-type', |
|
136 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/select2-custom-field-type', |
|
137 | 137 | 'archive_file_path' => 'custom-field-types/select2-custom-field-type/Select2CustomFieldType.php', |
138 | 138 | 'archive_dir_path' => 'custom-field-types/select2-custom-field-type', |
139 | 139 | 'text_domain' => 'admin-page-framework', |
@@ -142,13 +142,13 @@ discard block |
||
142 | 142 | |
143 | 143 | // Let third-party scripts add custom field types. |
144 | 144 | $this->aCustomFieldTypes = apply_filters( |
145 | - AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_custom_field_types', |
|
145 | + AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_custom_field_types', |
|
146 | 146 | $this->aCustomFieldTypes |
147 | 147 | ); |
148 | 148 | |
149 | - foreach( $this->aCustomFieldTypes as $_sKey => $_aCustomFieldType ) { |
|
149 | + foreach ( $this->aCustomFieldTypes as $_sKey => $_aCustomFieldType ) { |
|
150 | 150 | $this->aCustomFieldTypeLabels[ $_sKey ] = $_aCustomFieldType[ 'label' ] |
151 | - . ' - <span class="description">' . $_aCustomFieldType[ 'description' ] . '</span>'; |
|
151 | + . ' - <span class="description">'.$_aCustomFieldType[ 'description' ].'</span>'; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | } |
@@ -164,10 +164,10 @@ discard block |
||
164 | 164 | |
165 | 165 | // Check the file extension. |
166 | 166 | $_aAllowedExtensions = apply_filters( |
167 | - AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_allowed_file_extensions', |
|
167 | + AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_allowed_file_extensions', |
|
168 | 168 | array( 'php', 'css', 'js' ) |
169 | 169 | ); |
170 | - if ( ! in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions ) ) { |
|
170 | + if ( !in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions ) ) { |
|
171 | 171 | return $sFileContents; |
172 | 172 | } |
173 | 173 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | private function _getModifiedInclusionList( $sFileContents ) { |
198 | 198 | return str_replace( |
199 | 199 | ');', // search |
200 | - $this->_getClassListOfCustomFieldTypes() . ');', // replace - @todo insert the selected class list here |
|
200 | + $this->_getClassListOfCustomFieldTypes().');', // replace - @todo insert the selected class list here |
|
201 | 201 | $sFileContents // subject |
202 | 202 | ); |
203 | 203 | } |
@@ -214,18 +214,18 @@ discard block |
||
214 | 214 | $_POST, |
215 | 215 | array( |
216 | 216 | $this->oFactory->oProp->sOptionKey, |
217 | - 'generator', // section id |
|
217 | + 'generator', // section id |
|
218 | 218 | 'class_prefix' // field id |
219 | 219 | ), |
220 | 220 | '' |
221 | 221 | ); |
222 | 222 | $_aOutput = array(); |
223 | - foreach( $_aCheckedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
224 | - $_aOutput[] = ' "' . $_sClassPrefix . $_sClassName . '"' |
|
223 | + foreach ( $_aCheckedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
224 | + $_aOutput[ ] = ' "'.$_sClassPrefix.$_sClassName.'"' |
|
225 | 225 | . ' => ' |
226 | - . 'AdminPageFramework_Registry::$sDirPath . ' . '"/' . ltrim( $_aCustomFieldType[ 'archive_file_path' ], '/' ) . '",'; |
|
226 | + . 'AdminPageFramework_Registry::$sDirPath . '.'"/'.ltrim( $_aCustomFieldType[ 'archive_file_path' ], '/' ).'",'; |
|
227 | 227 | } |
228 | - return implode( PHP_EOL, $_aOutput ) . PHP_EOL; |
|
228 | + return implode( PHP_EOL, $_aOutput ).PHP_EOL; |
|
229 | 229 | |
230 | 230 | } |
231 | 231 | |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | $this->aCustomFieldTypes // ArchiveFilePaths |
244 | 244 | ); |
245 | 245 | $_aArchiveFilePaths = array(); |
246 | - foreach( $_aSelectedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
246 | + foreach ( $_aSelectedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
247 | 247 | $_aArchiveFilePaths[ $_sClassName ] = $this->oFactory->oUtil->getElement( |
248 | 248 | $_aCustomFieldType, |
249 | 249 | 'archive_file_path', |
@@ -295,17 +295,17 @@ discard block |
||
295 | 295 | array( $sParsingClassName, 'text_domain' ) |
296 | 296 | ); |
297 | 297 | if ( $_sFieldTypeTextDomain ) { |
298 | - $_aSearches[] = $_sFieldTypeTextDomain; |
|
299 | - $_aReplaces[] = $_sUserTextDomain; |
|
298 | + $_aSearches[ ] = $_sFieldTypeTextDomain; |
|
299 | + $_aReplaces[ ] = $_sUserTextDomain; |
|
300 | 300 | } |
301 | 301 | |
302 | - $_aSearches[] = 'admin-page-framework'; |
|
303 | - $_aReplaces[] = $_sUserTextDomain; |
|
302 | + $_aSearches[ ] = 'admin-page-framework'; |
|
303 | + $_aReplaces[ ] = $_sUserTextDomain; |
|
304 | 304 | |
305 | 305 | // Return the converted string. |
306 | 306 | return str_replace( |
307 | - $_aSearches, // search |
|
308 | - $_aReplaces, // replace |
|
307 | + $_aSearches, // search |
|
308 | + $_aReplaces, // replace |
|
309 | 309 | $sFileContents // subject |
310 | 310 | ); |
311 | 311 | |
@@ -323,8 +323,8 @@ discard block |
||
323 | 323 | ); |
324 | 324 | |
325 | 325 | return preg_replace( |
326 | - $this->_getClassPrefixRegexPatterns( $_aSelectedFieldTypeClassNames ), // search |
|
327 | - $this->_getClassPrefixRegexReplacements( $_aSelectedFieldTypeClassNames ), // replace |
|
326 | + $this->_getClassPrefixRegexPatterns( $_aSelectedFieldTypeClassNames ), // search |
|
327 | + $this->_getClassPrefixRegexReplacements( $_aSelectedFieldTypeClassNames ), // replace |
|
328 | 328 | $sFileContents // subject |
329 | 329 | ); |
330 | 330 | |
@@ -337,8 +337,8 @@ discard block |
||
337 | 337 | private function _getClassPrefixRegexPatterns( array $aSelectedFieldTypeClassNames ) { |
338 | 338 | |
339 | 339 | $_aPregSearches = array(); |
340 | - foreach( $aSelectedFieldTypeClassNames as $_sClassName ) { |
|
341 | - $_aPregSearches[] = '/(?<=[^a-zA-Z0-9])(' . $_sClassName . ')/'; |
|
340 | + foreach ( $aSelectedFieldTypeClassNames as $_sClassName ) { |
|
341 | + $_aPregSearches[ ] = '/(?<=[^a-zA-Z0-9])('.$_sClassName.')/'; |
|
342 | 342 | } |
343 | 343 | return $_aPregSearches; |
344 | 344 | |
@@ -350,9 +350,9 @@ discard block |
||
350 | 350 | */ |
351 | 351 | private function _getClassPrefixRegexReplacements( array $aSelectedFieldTypeClassNames ) { |
352 | 352 | |
353 | - $_aPrefixedClassNames = $aSelectedFieldTypeClassNames; |
|
353 | + $_aPrefixedClassNames = $aSelectedFieldTypeClassNames; |
|
354 | 354 | array_walk( |
355 | - $_aPrefixedClassNames, // passed by reference |
|
355 | + $_aPrefixedClassNames, // passed by reference |
|
356 | 356 | array( $this, '_replyToSetPrefix' ), |
357 | 357 | $this->oFactory->oUtil->getElement( |
358 | 358 | $_POST, |
@@ -373,8 +373,8 @@ discard block |
||
373 | 373 | * @callback function array_walk |
374 | 374 | * @return string |
375 | 375 | */ |
376 | - public function _replyToSetPrefix( &$sClassName, $sKey, $sPrefix='' ) { |
|
377 | - $sClassName = $sPrefix . '$0'; |
|
376 | + public function _replyToSetPrefix( &$sClassName, $sKey, $sPrefix = '' ) { |
|
377 | + $sClassName = $sPrefix.'$0'; |
|
378 | 378 | } |
379 | 379 | |
380 | 380 | |
@@ -395,12 +395,12 @@ discard block |
||
395 | 395 | */ |
396 | 396 | public function replyToSetAdditionalDirectoriesForGenerator( $aDirPaths ) { |
397 | 397 | |
398 | - $_aCheckedCustomFieldTypes = $this->_getSelectedCustomFieldTypes( |
|
398 | + $_aCheckedCustomFieldTypes = $this->_getSelectedCustomFieldTypes( |
|
399 | 399 | $this->aCustomFieldTypes |
400 | 400 | ); |
401 | 401 | |
402 | 402 | $_aDirPathInfo = array(); |
403 | - foreach( $_aCheckedCustomFieldTypes as $_sKey => $_aCheckedCustomFieldType ) { |
|
403 | + foreach ( $_aCheckedCustomFieldTypes as $_sKey => $_aCheckedCustomFieldType ) { |
|
404 | 404 | |
405 | 405 | $_sArchiveDirPath = $this->oFactory->oUtil->getElement( $_aCheckedCustomFieldType, 'archive_dir_path' ); |
406 | 406 | $_sSourceDirPath = $this->oFactory->oUtil->getElement( $_aCheckedCustomFieldType, 'directory_path' ); |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | * @return array The array keys of the checked items. |
417 | 417 | * @since 3.6.0 |
418 | 418 | */ |
419 | - private function _getSelectedCustomFieldTypes( array $aSubject=array() ) { |
|
419 | + private function _getSelectedCustomFieldTypes( array $aSubject = array() ) { |
|
420 | 420 | |
421 | 421 | $_aCheckedCustomFieldTypes = $this->oFactory->oUtil->getElementAsArray( |
422 | 422 | $_POST, |
@@ -18,14 +18,14 @@ discard block |
||
18 | 18 | */ |
19 | 19 | class AdminPageFramework_Form_View___SectionTitle extends AdminPageFramework_Form_View___Section_Base { |
20 | 20 | |
21 | - public $aArguments = array( |
|
21 | + public $aArguments = array( |
|
22 | 22 | 'title' => null, |
23 | 23 | 'tag' => null, |
24 | 24 | 'section_index' => null, |
25 | 25 | |
26 | 26 | 'sectionset' => array(), |
27 | 27 | ); |
28 | - public $aFieldsets = array(); |
|
28 | + public $aFieldsets = array(); |
|
29 | 29 | public $aSavedData = array(); |
30 | 30 | public $aFieldErrors = array(); |
31 | 31 | public $aFieldTypeDefinitions = array(); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | private function _getToolTip() { |
84 | 84 | |
85 | 85 | $_aSectionset = $this->aArguments[ 'sectionset' ]; |
86 | - $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ) . '_' . $this->aArguments[ 'section_index' ]; |
|
86 | + $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ).'_'.$this->aArguments[ 'section_index' ]; |
|
87 | 87 | $_oToolTip = new AdminPageFramework_Form_View___ToolTip( |
88 | 88 | $_aSectionset[ 'tip' ], |
89 | 89 | $_sSectionTitleTagID |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * @since 3.7.0 Moved from `AdminPageFramework_FormPart_SectionTitle`. |
105 | 105 | * @return string The section title output. |
106 | 106 | */ |
107 | - protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex=null, $aFieldTypeDefinitions=array(), $aCollapsible=array() ) { |
|
107 | + protected function _getSectionTitle( $sTitle, $sTag, $aFieldsets, $iSectionIndex = null, $aFieldTypeDefinitions = array(), $aCollapsible = array() ) { |
|
108 | 108 | |
109 | 109 | $_aSectionTitleFieldset = $this->_getSectionTitleField( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ); |
110 | 110 | $_sFieldsInSectionTitle = $this->_getFieldsetsOutputInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $_bHasOtherFields = $_sFieldsInSectionTitle |
115 | 115 | ? ' has-fields' |
116 | 116 | : ''; |
117 | - $_sOutput = $_sTitle . $_sFieldsInSectionTitle; |
|
117 | + $_sOutput = $_sTitle.$_sFieldsInSectionTitle; |
|
118 | 118 | return $_sOutput |
119 | 119 | ? "<div class='section-title-container{$_bHasOtherFields}'>" |
120 | 120 | . $_sOutput |
@@ -160,8 +160,8 @@ discard block |
||
160 | 160 | private function _getFieldsetsOutputInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
161 | 161 | |
162 | 162 | $_sOutput = ''; |
163 | - foreach( $this->_getFieldsetsInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) as $_aFieldset ) { |
|
164 | - if ( empty( $_aFieldset ) ) { |
|
163 | + foreach ( $this->_getFieldsetsInSectionTitleArea( $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) as $_aFieldset ) { |
|
164 | + if ( empty( $_aFieldset ) ) { |
|
165 | 165 | continue; |
166 | 166 | } |
167 | 167 | $_sOutput .= $this->getFieldsetOutput( $_aFieldset ); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | private function _getFieldsetsInSectionTitleArea( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
178 | 178 | |
179 | 179 | $_aFieldsetsInSectionTitle = array(); |
180 | - foreach( $aFieldsets as $_aFieldset ) { |
|
180 | + foreach ( $aFieldsets as $_aFieldset ) { |
|
181 | 181 | |
182 | 182 | if ( 'section_title' !== $_aFieldset[ 'placement' ] ) { |
183 | 183 | continue; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $iSectionIndex, |
189 | 189 | $aFieldTypeDefinitions |
190 | 190 | ); |
191 | - $_aFieldsetsInSectionTitle[] = $_oFieldsetOutputFormatter->get(); |
|
191 | + $_aFieldsetsInSectionTitle[ ] = $_oFieldsetOutputFormatter->get(); |
|
192 | 192 | |
193 | 193 | } |
194 | 194 | return $_aFieldsetsInSectionTitle; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | */ |
208 | 208 | private function _getSectionTitleField( array $aFieldsets, $iSectionIndex, $aFieldTypeDefinitions ) { |
209 | 209 | |
210 | - foreach( $aFieldsets as $_aFieldset ) { |
|
210 | + foreach ( $aFieldsets as $_aFieldset ) { |
|
211 | 211 | |
212 | 212 | if ( 'section_title' !== $_aFieldset[ 'type' ] ) { |
213 | 213 | continue; |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | */ |
17 | 17 | class AdminPageFrameworkLoader_Registry_Base { |
18 | 18 | |
19 | - const VERSION = '3.8.7b01'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! |
|
19 | + const VERSION = '3.8.7b01'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! |
|
20 | 20 | const NAME = 'Admin Page Framework - Loader'; // the name is not 'Admin Page Framework' because warning messages gets confusing. |
21 | - const SHORTNAME = 'Admin Page Framework'; // used for a menu title etc. |
|
21 | + const SHORTNAME = 'Admin Page Framework'; // used for a menu title etc. |
|
22 | 22 | const DESCRIPTION = 'Loads Admin Page Framework which facilitates WordPress plugin and theme development.'; |
23 | 23 | const URI = 'http://admin-page-framework.michaeluno.jp/'; |
24 | 24 | const AUTHOR = 'miunosoft (Michael Uno)'; |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | * @remark This is also accessed from `uninstall.php` so do not remove. |
56 | 56 | * @remark Do not exceed 8 characters as a transient name allows 45 characters or less ( 40 for site transients ) so that md5 (32 characters) can be added. |
57 | 57 | */ |
58 | - const TRANSIENT_PREFIX = 'APFL_'; |
|
58 | + const TRANSIENT_PREFIX = 'APFL_'; |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * The hook slug used for the prefix of action and filter hook names. |
62 | 62 | * |
63 | 63 | * @remark The ending underscore is not necessary. |
64 | 64 | */ |
65 | - const HOOK_SLUG = 'admin_page_framework_loader'; |
|
65 | + const HOOK_SLUG = 'admin_page_framework_loader'; |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * The text domain slug and its path. |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | static public $aAdminPages = array( |
118 | 118 | // key => 'page slug' |
119 | - 'about' => 'apfl_about', // the welcome page |
|
119 | + 'about' => 'apfl_about', // the welcome page |
|
120 | 120 | 'addon' => 'apfl_addons', |
121 | 121 | 'tool' => 'apfl_tools', |
122 | 122 | 'help' => 'apfl_contact', |
@@ -154,12 +154,12 @@ discard block |
||
154 | 154 | * @since 3.5.0 |
155 | 155 | * @return string |
156 | 156 | */ |
157 | - public static function getPluginURL( $sRelativePath='' ) { |
|
157 | + public static function getPluginURL( $sRelativePath = '' ) { |
|
158 | 158 | if ( isset( self::$_sPluginURLCache ) ) { |
159 | - return self::$_sPluginURLCache . $sRelativePath; |
|
159 | + return self::$_sPluginURLCache.$sRelativePath; |
|
160 | 160 | } |
161 | 161 | self::$_sPluginURLCache = trailingslashit( plugins_url( '', self::$sFilePath ) ); |
162 | - return self::$_sPluginURLCache . $sRelativePath; |
|
162 | + return self::$_sPluginURLCache.$sRelativePath; |
|
163 | 163 | } |
164 | 164 | /** |
165 | 165 | * @since 3.7.9 |
@@ -189,13 +189,13 @@ discard block |
||
189 | 189 | * @since 3.5.0 |
190 | 190 | * @return void |
191 | 191 | */ |
192 | - static public function setAdminNotice( $sMessage, $sClassAttribute='error' ) { |
|
193 | - if ( ! is_admin() ) { |
|
192 | + static public function setAdminNotice( $sMessage, $sClassAttribute = 'error' ) { |
|
193 | + if ( !is_admin() ) { |
|
194 | 194 | return; |
195 | 195 | } |
196 | - self::$_aAdminNotices[] = array( |
|
196 | + self::$_aAdminNotices[ ] = array( |
|
197 | 197 | 'message' => $sMessage, |
198 | - 'class_attribute' => trim( $sClassAttribute ) . ' notice is-dismissible', |
|
198 | + 'class_attribute' => trim( $sClassAttribute ).' notice is-dismissible', |
|
199 | 199 | ); |
200 | 200 | add_action( 'admin_notices', array( __CLASS__, '_replyToSetAdminNotice' ) ); |
201 | 201 | } |
@@ -205,12 +205,12 @@ discard block |
||
205 | 205 | * @return void |
206 | 206 | */ |
207 | 207 | static public function _replyToSetAdminNotice() { |
208 | - foreach( self::$_aAdminNotices as $_aAdminNotice ) { |
|
209 | - echo "<div class='" . esc_attr( $_aAdminNotice['class_attribute'] ) . " notice is-dismissible'>" |
|
208 | + foreach ( self::$_aAdminNotices as $_aAdminNotice ) { |
|
209 | + echo "<div class='".esc_attr( $_aAdminNotice[ 'class_attribute' ] )." notice is-dismissible'>" |
|
210 | 210 | ."<p>" |
211 | 211 | . sprintf( |
212 | - '<strong>%1$s</strong>: ' . $_aAdminNotice['message'], |
|
213 | - self::NAME . ' ' . self::VERSION |
|
212 | + '<strong>%1$s</strong>: '.$_aAdminNotice[ 'message' ], |
|
213 | + self::NAME.' '.self::VERSION |
|
214 | 214 | ) |
215 | 215 | . "</p>" |
216 | 216 | . "</div>"; |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | AdminPageFrameworkLoader_Registry::setUp( __FILE__ ); |
223 | 223 | |
224 | 224 | // Initial checks. - Do no load if accessed directly, not exiting because the 'uninstall.php' and inclusion list generator will load this file. |
225 | -if ( ! defined( 'ABSPATH' ) ) { |
|
225 | +if ( !defined( 'ABSPATH' ) ) { |
|
226 | 226 | return; |
227 | 227 | } |
228 | 228 | if ( defined( 'DOING_UNINSTALL' ) ) { |
@@ -234,8 +234,8 @@ discard block |
||
234 | 234 | |
235 | 235 | $_bFrameworkLoaded = class_exists( 'AdminPageFramework_Registry', false ); |
236 | 236 | if ( |
237 | - ! $_bFrameworkLoaded |
|
238 | - || ! defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility |
|
237 | + !$_bFrameworkLoaded |
|
238 | + || !defined( 'AdminPageFramework_Registry::VERSION' ) // backward compatibility |
|
239 | 239 | || version_compare( AdminPageFramework_Registry::VERSION, AdminPageFrameworkLoader_Registry::VERSION, '<' ) |
240 | 240 | ) { |
241 | 241 | AdminPageFrameworkLoader_Registry::setAdminNotice( |
@@ -253,18 +253,18 @@ discard block |
||
253 | 253 | add_action( 'admin_init', 'AdminPageFrameworkLoader_Warning' ); |
254 | 254 | |
255 | 255 | // Include the library file - the development version will be available if you cloned the GitHub repository. |
256 | -$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath . '/development/admin-page-framework.php'; |
|
256 | +$_sDevelopmentVersionPath = AdminPageFrameworkLoader_Registry::$sDirPath.'/development/admin-page-framework.php'; |
|
257 | 257 | $_bDebugMode = defined( 'WP_DEBUG' ) && WP_DEBUG; |
258 | 258 | $_bLoadDevelopmentVersion = $_bDebugMode && file_exists( $_sDevelopmentVersionPath ); |
259 | 259 | include( |
260 | 260 | $_bLoadDevelopmentVersion |
261 | 261 | ? $_sDevelopmentVersionPath |
262 | - : AdminPageFrameworkLoader_Registry::$sDirPath . '/library/apf/admin-page-framework.php' |
|
262 | + : AdminPageFrameworkLoader_Registry::$sDirPath.'/library/apf/admin-page-framework.php' |
|
263 | 263 | ); |
264 | 264 | |
265 | 265 | // Include the framework loader plugin components. |
266 | 266 | include( AdminPageFramework_Registry::$aClassFiles[ 'AdminPageFramework_PluginBootstrap' ] ); |
267 | -include( AdminPageFrameworkLoader_Registry::$sDirPath . '/include/class/AdminPageFrameworkLoader_Bootstrap.php' ); |
|
267 | +include( AdminPageFrameworkLoader_Registry::$sDirPath.'/include/class/AdminPageFrameworkLoader_Bootstrap.php' ); |
|
268 | 268 | new AdminPageFrameworkLoader_Bootstrap( |
269 | 269 | AdminPageFrameworkLoader_Registry::$sFilePath, |
270 | 270 | AdminPageFrameworkLoader_Registry::HOOK_SLUG // hook prefix |