Add setup wizard
This commit is contained in:
@@ -40,9 +40,9 @@ class SP_Admin_Notices {
|
||||
$screen = get_current_screen();
|
||||
$notices = get_option( 'sportspress_admin_notices', array() );
|
||||
|
||||
if ( get_option( '_sp_needs_welcome' ) == 1 && $screen->id != 'toplevel_page_sportspress' ) {
|
||||
wp_enqueue_style( 'sportspress-activation', plugins_url( '/assets/css/activation.css', SP_PLUGIN_FILE ) );
|
||||
add_action( 'admin_notices', array( $this, 'install_notice' ) );
|
||||
if ( ! get_option( 'sportspress_completed_setup' ) ) {
|
||||
wp_enqueue_style( 'sportspress-activation', plugins_url( '/assets/css/activation.css', SP_PLUGIN_FILE ) );
|
||||
add_action( 'admin_notices', array( $this, 'setup_notice' ) );
|
||||
}
|
||||
|
||||
if ( is_object( $screen ) && 'post' == $screen->base ) {
|
||||
@@ -62,7 +62,7 @@ class SP_Admin_Notices {
|
||||
update_option( 'sportspress_admin_notices', $notices );
|
||||
}
|
||||
|
||||
if ( in_array( 'theme_support', $notices ) && ! current_theme_supports( 'sportspress' ) && ! in_array( $screen->id, array( 'toplevel_page_sportspress', 'dashboard_page_sp-about', 'dashboard_page_sp-credits', 'dashboard_page_sp-translators' ) ) ) {
|
||||
if ( is_object( $screen ) && in_array( 'theme_support', $notices ) && ! current_theme_supports( 'sportspress' ) && ! in_array( $screen->id, array( 'toplevel_page_sportspress', 'dashboard_page_sp-about', 'dashboard_page_sp-credits', 'dashboard_page_sp-translators' ) ) ) {
|
||||
$template = get_option( 'template' );
|
||||
|
||||
if ( ! in_array( $template, array( 'twentyfifteen', 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' ) ) ) {
|
||||
@@ -78,9 +78,9 @@ class SP_Admin_Notices {
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the install notices
|
||||
* Show the setup notices
|
||||
*/
|
||||
public function install_notice() {
|
||||
public function setup_notice() {
|
||||
include( 'views/html-notice-install.php' );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user