Skip to content

Commit

Permalink
2.0.0.0-beta 2
Browse files Browse the repository at this point in the history
  • Loading branch information
stiofan committed Mar 19, 2018
1 parent 2627fd0 commit 6184f30
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
12 changes: 9 additions & 3 deletions includes/admin/class-geodir-admin-notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ class GeoDir_Admin_Notices {
'install' => 'install_notice',
'update' => 'update_notice',
'theme_support' => 'theme_check_notice',
'legacy_shipping' => 'legacy_shipping_notice',
'no_shipping_methods' => 'no_shipping_methods_notice',
'simplify_commerce' => 'simplify_commerce_notice',
'beta' => 'beta_notice',
);

/**
Expand Down Expand Up @@ -81,6 +79,7 @@ public static function remove_all_notices() {
public static function reset_admin_notices() {
if ( ! current_theme_supports( 'geodirectory' ) && ! in_array( get_option( 'template' ), geodir_get_core_supported_themes() ) ) {
self::add_notice( 'theme_support' );
self::add_notice( 'beta' );
}
self::add_notice( 'template_files' );
}
Expand Down Expand Up @@ -211,6 +210,13 @@ public static function theme_check_notice() {
}
}

/**
* Show the Theme Check notice.
*/
public static function beta_notice() {
include( 'views/html-notice-beta.php' );
}


}

Expand Down
17 changes: 17 additions & 0 deletions includes/admin/views/html-notice-beta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* Admin View: Notice - Beta notice
*/

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

?>
<div id="message" class="notice-warning notice notice-alt geodir-message">
<p><?php _e("This GeoDirectory core beta is a very early release and is not recommended from a production site.") ?></p>
<p><?php _e("GeoDirectory addons are not supported yet, this is a core beta, addons will be supported once core is out of beta.") ?></p>
<p class="submit">
<a href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'gd-hide-notice', 'beta' ), 'geodir_hide_notices_nonce', '_gd_notice_nonce' ) ); ?>" class="button-secondary"><?php _e( 'Dismiss', 'geodirectory' ); ?></a>
</p>
</div>

0 comments on commit 6184f30

Please sign in to comment.