@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | /// [3.9.0] Insert checked custom field types in the file comment header |
| 87 | 87 | add_filter( |
| 88 | - AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_header_comment', |
|
| 88 | + AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_header_comment', |
|
| 89 | 89 | array( $this, 'replyToGetAdditionalHeaderComment' ) |
| 90 | 90 | ); |
| 91 | 91 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | 'class_name' => 'AceCustomFieldType', |
| 102 | 102 | 'label' => __( 'ACE', 'admin-page-framework-loader' ), |
| 103 | 103 | 'description' => __( 'provides code syntax highlighting in a text area field.', 'admin-page-framework-loader' ), |
| 104 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/ace-custom-field-type', |
|
| 104 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/ace-custom-field-type', |
|
| 105 | 105 | 'archive_file_path' => 'custom-field-types/ace-custom-field-type/AceCustomFieldType.php', |
| 106 | 106 | 'archive_dir_path' => 'custom-field-types/ace-custom-field-type', |
| 107 | 107 | 'text_domain' => 'admin-page-framework', |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | 'class_name' => 'GitHubCustomFieldType', |
| 111 | 111 | 'label' => __( 'GitHub Buttons', 'admin-page-framework-loader' ), |
| 112 | 112 | 'description' => __( 'allows you to display GitHub buttons in a field.', 'admin-page-framework-loader' ), |
| 113 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/include/library/github-custom-field-type', |
|
| 113 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/include/library/github-custom-field-type', |
|
| 114 | 114 | 'archive_file_path' => 'custom-field-types/github-custom-field-type/GitHubCustomFieldType.php', |
| 115 | 115 | 'archive_dir_path' => 'custom-field-types/github-custom-field-type', |
| 116 | 116 | 'text_domain' => 'admin-page-framework', |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | 'class_name' => 'PathCustomFieldType', |
| 120 | 120 | 'label' => __( 'Path', 'admin-page-framework-loader' ), |
| 121 | 121 | 'description' => __( 'allows the user to select a file path on the server.', 'admin-page-framework-loader' ), |
| 122 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/path-custom-field-type', |
|
| 122 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/path-custom-field-type', |
|
| 123 | 123 | 'archive_file_path' => 'custom-field-types/path-custom-field-type/PathCustomFieldType.php', |
| 124 | 124 | 'archive_dir_path' => 'custom-field-types/path-custom-field-type', |
| 125 | 125 | 'text_domain' => 'admin-page-framework', |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | 'class_name' => 'ToggleCustomFieldType', |
| 129 | 129 | 'label' => __( 'Toggle', 'admin-page-framework-loader' ), |
| 130 | 130 | 'description' => __( 'allows the user to switch a button.', 'admin-page-framework-loader' ), |
| 131 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/toggle-custom-field-type', |
|
| 131 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/toggle-custom-field-type', |
|
| 132 | 132 | 'archive_file_path' => 'custom-field-types/toggle-custom-field-type/ToggleCustomFieldType.php', |
| 133 | 133 | 'archive_dir_path' => 'custom-field-types/toggle-custom-field-type', |
| 134 | 134 | 'text_domain' => 'admin-page-framework', |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | 'class_name' => 'NoUISliderCustomFieldType', |
| 138 | 138 | 'label' => __( 'NoUISlider (Range Slider)', 'admin-page-framework-loader' ), |
| 139 | 139 | 'description' => __( 'allows the user to set values in ranges.', 'admin-page-framework-loader' ), |
| 140 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/nouislider-custom-field-type', |
|
| 140 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/nouislider-custom-field-type', |
|
| 141 | 141 | 'archive_file_path' => 'custom-field-types/nouislider-custom-field-type/NoUISliderCustomFieldType.php', |
| 142 | 142 | 'archive_dir_path' => 'custom-field-types/nouislider-custom-field-type', |
| 143 | 143 | 'text_domain' => 'admin-page-framework', |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | 'class_name' => 'Select2CustomFieldType', |
| 147 | 147 | 'label' => __( 'Select2', 'admin-page-framework-loader' ), |
| 148 | 148 | 'description' => __( 'allows the user to select items with autocomplete from a list which can be populated with AJAX.', 'admin-page-framework-loader' ), |
| 149 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/select2-custom-field-type', |
|
| 149 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/select2-custom-field-type', |
|
| 150 | 150 | 'archive_file_path' => 'custom-field-types/select2-custom-field-type/Select2CustomFieldType.php', |
| 151 | 151 | 'archive_dir_path' => 'custom-field-types/select2-custom-field-type', |
| 152 | 152 | 'text_domain' => 'admin-page-framework', |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | 'class_name' => 'PostTypeTaxonomyCustomFieldType', |
| 156 | 156 | 'label' => __( 'Post Type Taxonomy', 'admin-page-framework-loader' ), |
| 157 | 157 | 'description' => __( 'allows the user to select taxonomy terms of selected post types.', 'admin-page-framework-loader' ), |
| 158 | - 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath . '/example/library/post_type_taxonomy_field-type', |
|
| 158 | + 'directory_path' => AdminPageFrameworkLoader_Registry::$sDirPath.'/example/library/post_type_taxonomy_field-type', |
|
| 159 | 159 | 'archive_file_path' => 'custom-field-types/post_type_taxonomy_field-type/PostTypeTaxonomyCustomFieldType.php', |
| 160 | 160 | 'archive_dir_path' => 'custom-field-types/post_type_taxonomy_field-type', |
| 161 | 161 | 'text_domain' => 'admin-page-framework', |
@@ -164,13 +164,13 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | // Let third-party scripts add custom field types. |
| 166 | 166 | $this->aCustomFieldTypes = apply_filters( |
| 167 | - AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_custom_field_types', |
|
| 167 | + AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_custom_field_types', |
|
| 168 | 168 | $this->aCustomFieldTypes |
| 169 | 169 | ); |
| 170 | 170 | |
| 171 | - foreach( $this->aCustomFieldTypes as $_sKey => $_aCustomFieldType ) { |
|
| 171 | + foreach ( $this->aCustomFieldTypes as $_sKey => $_aCustomFieldType ) { |
|
| 172 | 172 | $this->aCustomFieldTypeLabels[ $_sKey ] = $_aCustomFieldType[ 'label' ] |
| 173 | - . ' - <span class="description">' . $_aCustomFieldType[ 'description' ] . '</span>'; |
|
| 173 | + . ' - <span class="description">'.$_aCustomFieldType[ 'description' ].'</span>'; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | } |
@@ -186,10 +186,10 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | // Check the file extension. |
| 188 | 188 | $_aAllowedExtensions = apply_filters( |
| 189 | - AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_allowed_file_extensions', |
|
| 189 | + AdminPageFrameworkLoader_Registry::HOOK_SLUG.'_filter_generator_allowed_file_extensions', |
|
| 190 | 190 | array( 'php', 'css', 'js' ) |
| 191 | 191 | ); |
| 192 | - if ( ! in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions, true ) ) { |
|
| 192 | + if ( !in_array( pathinfo( $sPathInArchive, PATHINFO_EXTENSION ), $_aAllowedExtensions, true ) ) { |
|
| 193 | 193 | return $sFileContents; |
| 194 | 194 | } |
| 195 | 195 | |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | private function ___getModifiedIncludeList( $sFileContents ) { |
| 220 | 220 | return str_replace( |
| 221 | 221 | ');', // search |
| 222 | - $this->___getClassListOfCustomFieldTypes() . ');', // replace - @todo insert the selected class list here |
|
| 222 | + $this->___getClassListOfCustomFieldTypes().');', // replace - @todo insert the selected class list here |
|
| 223 | 223 | $sFileContents // subject |
| 224 | 224 | ); |
| 225 | 225 | } |
@@ -234,18 +234,18 @@ discard block |
||
| 234 | 234 | $_POST, |
| 235 | 235 | array( |
| 236 | 236 | $this->oFactory->oProp->sOptionKey, |
| 237 | - 'compiler', // section id |
|
| 237 | + 'compiler', // section id |
|
| 238 | 238 | 'class_prefix' // field id |
| 239 | 239 | ), |
| 240 | 240 | '' |
| 241 | 241 | ) ); |
| 242 | 242 | $_aOutput = array(); |
| 243 | - foreach( $_aCheckedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
| 244 | - $_aOutput[] = ' "' . $_sClassPrefix . $_sClassName . '"' |
|
| 243 | + foreach ( $_aCheckedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
| 244 | + $_aOutput[ ] = ' "'.$_sClassPrefix.$_sClassName.'"' |
|
| 245 | 245 | . ' => ' |
| 246 | - . 'AdminPageFramework_Registry::$sDirPath . ' . '"/' . ltrim( $_aCustomFieldType[ 'archive_file_path' ], '/' ) . '",'; |
|
| 246 | + . 'AdminPageFramework_Registry::$sDirPath . '.'"/'.ltrim( $_aCustomFieldType[ 'archive_file_path' ], '/' ).'",'; |
|
| 247 | 247 | } |
| 248 | - return implode( PHP_EOL, $_aOutput ) . PHP_EOL; |
|
| 248 | + return implode( PHP_EOL, $_aOutput ).PHP_EOL; |
|
| 249 | 249 | |
| 250 | 250 | } |
| 251 | 251 | |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | */ |
| 261 | 261 | private function ___getClassNameIfSelected( $sPathInArchive ) { |
| 262 | 262 | $_aSelectedCustomFieldTypes = $this->___getSelectedCustomFieldTypes( $this->aCustomFieldTypes ); |
| 263 | - foreach( $_aSelectedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
| 263 | + foreach ( $_aSelectedCustomFieldTypes as $_sClassName => $_aCustomFieldType ) { |
|
| 264 | 264 | $_sThisArchiveDirPath = $this->oFactory->oUtil->getElement( $_aCustomFieldType, 'archive_dir_path' ); |
| 265 | 265 | if ( false !== strpos( $sPathInArchive, $_sThisArchiveDirPath ) ) { |
| 266 | 266 | return $_sClassName; |
@@ -308,17 +308,17 @@ discard block |
||
| 308 | 308 | array( $sParsingClassName, 'text_domain' ) |
| 309 | 309 | ); |
| 310 | 310 | if ( $_sFieldTypeTextDomain ) { |
| 311 | - $_aSearches[] = $_sFieldTypeTextDomain; |
|
| 312 | - $_aReplaces[] = $_sUserTextDomain; |
|
| 311 | + $_aSearches[ ] = $_sFieldTypeTextDomain; |
|
| 312 | + $_aReplaces[ ] = $_sUserTextDomain; |
|
| 313 | 313 | } |
| 314 | 314 | |
| 315 | - $_aSearches[] = 'admin-page-framework'; |
|
| 316 | - $_aReplaces[] = $_sUserTextDomain; |
|
| 315 | + $_aSearches[ ] = 'admin-page-framework'; |
|
| 316 | + $_aReplaces[ ] = $_sUserTextDomain; |
|
| 317 | 317 | |
| 318 | 318 | // Return the converted string. |
| 319 | 319 | return str_replace( |
| 320 | - $_aSearches, // search |
|
| 321 | - $_aReplaces, // replace |
|
| 320 | + $_aSearches, // search |
|
| 321 | + $_aReplaces, // replace |
|
| 322 | 322 | $sFileContents // subject |
| 323 | 323 | ); |
| 324 | 324 | |
@@ -336,8 +336,8 @@ discard block |
||
| 336 | 336 | ); |
| 337 | 337 | |
| 338 | 338 | return preg_replace( |
| 339 | - $this->___getClassPrefixRegexPatterns( $_aSelectedFieldTypeClassNames ), // search |
|
| 340 | - $this->___getClassPrefixRegexReplacements( $_aSelectedFieldTypeClassNames ), // replace |
|
| 339 | + $this->___getClassPrefixRegexPatterns( $_aSelectedFieldTypeClassNames ), // search |
|
| 340 | + $this->___getClassPrefixRegexReplacements( $_aSelectedFieldTypeClassNames ), // replace |
|
| 341 | 341 | $sFileContents // subject |
| 342 | 342 | ); |
| 343 | 343 | |
@@ -350,8 +350,8 @@ discard block |
||
| 350 | 350 | private function ___getClassPrefixRegexPatterns( array $aSelectedFieldTypeClassNames ) { |
| 351 | 351 | |
| 352 | 352 | $_aPregSearches = array(); |
| 353 | - foreach( $aSelectedFieldTypeClassNames as $_sClassName ) { |
|
| 354 | - $_aPregSearches[] = '/(?<=[^a-zA-Z0-9])(' . $_sClassName . ')/'; |
|
| 353 | + foreach ( $aSelectedFieldTypeClassNames as $_sClassName ) { |
|
| 354 | + $_aPregSearches[ ] = '/(?<=[^a-zA-Z0-9])('.$_sClassName.')/'; |
|
| 355 | 355 | } |
| 356 | 356 | return $_aPregSearches; |
| 357 | 357 | |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | * @callback array_walk() |
| 385 | 385 | */ |
| 386 | 386 | private function ___replyToSetPrefix( &$sClassName, $sKey, $sPrefix ) { |
| 387 | - $sClassName = $sPrefix . '$0'; |
|
| 387 | + $sClassName = $sPrefix.'$0'; |
|
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | public function replyToSetAdditionalDirectoriesForGenerator( $aDirPaths ) { |
| 407 | 407 | $_aCheckedCustomFieldTypes = $this->___getSelectedCustomFieldTypes( $this->aCustomFieldTypes ); |
| 408 | 408 | $_aDirPathInfo = array(); |
| 409 | - foreach( $_aCheckedCustomFieldTypes as $_sKey => $_aCheckedCustomFieldType ) { |
|
| 409 | + foreach ( $_aCheckedCustomFieldTypes as $_sKey => $_aCheckedCustomFieldType ) { |
|
| 410 | 410 | $_sArchiveDirPath = $this->oFactory->oUtil->getElement( $_aCheckedCustomFieldType, 'archive_dir_path' ); |
| 411 | 411 | $_sSourceDirPath = $this->oFactory->oUtil->getElement( $_aCheckedCustomFieldType, 'directory_path' ); |
| 412 | 412 | $_aDirPathInfo[ $_sArchiveDirPath ] = $_sSourceDirPath; |
@@ -417,9 +417,9 @@ discard block |
||
| 417 | 417 | * @return array The array keys of the checked items. |
| 418 | 418 | * @since 3.6.0 |
| 419 | 419 | */ |
| 420 | - private function ___getSelectedCustomFieldTypes( array $aSubject=array() ) { |
|
| 421 | - static $_aCheckedCustomFieldTypes; // cache |
|
| 422 | - if ( ! isset( $_aCheckedCustomFieldTypes ) ) { |
|
| 420 | + private function ___getSelectedCustomFieldTypes( array $aSubject = array() ) { |
|
| 421 | + static $_aCheckedCustomFieldTypes; // cache |
|
| 422 | + if ( !isset( $_aCheckedCustomFieldTypes ) ) { |
|
| 423 | 423 | $_aCheckedCustomFieldTypes = $this->oFactory->oUtil->getElementAsArray( |
| 424 | 424 | $_POST, |
| 425 | 425 | array( |
@@ -444,13 +444,13 @@ discard block |
||
| 444 | 444 | */ |
| 445 | 445 | public function replyToGetAdditionalHeaderComment( $sComment ) { |
| 446 | 446 | $_aCustomFieldTypeLabels = array(); |
| 447 | - foreach( $this->___getCheckedCustomFieldTypeKeys() as $_sCheckedKey ) { |
|
| 447 | + foreach ( $this->___getCheckedCustomFieldTypeKeys() as $_sCheckedKey ) { |
|
| 448 | 448 | $_sThisLabel = $this->oFactory->oUtil->getElement( $this->aCustomFieldTypes, array( $_sCheckedKey, 'label' ) ); |
| 449 | - $_aCustomFieldTypeLabels[] = strlen( $_sThisLabel ) ? $_sThisLabel : $_sCheckedKey; |
|
| 449 | + $_aCustomFieldTypeLabels[ ] = strlen( $_sThisLabel ) ? $_sThisLabel : $_sCheckedKey; |
|
| 450 | 450 | } |
| 451 | 451 | return empty( $_aCustomFieldTypeLabels ) |
| 452 | 452 | ? $sComment |
| 453 | - : $sComment . PHP_EOL . ' Custom Field Types: ' . implode( ', ', $_aCustomFieldTypeLabels ); |
|
| 453 | + : $sComment.PHP_EOL.' Custom Field Types: '.implode( ', ', $_aCustomFieldTypeLabels ); |
|
| 454 | 454 | } |
| 455 | 455 | /** |
| 456 | 456 | * @return string[] |
@@ -16,9 +16,9 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | class AdminPageFrameworkLoader_Registry_Base { |
| 18 | 18 | |
| 19 | - const VERSION = '3.9.0b18'; // <--- DON'T FORGET TO CHANGE THIS AS WELL!! |
|
| 19 | + const VERSION = '3.9.0b18'; // <--- 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 = 'https://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' ) && 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 |