Adjust for theme support
This commit is contained in:
@@ -37,13 +37,14 @@ class SP_Admin_Notices {
|
||||
* Add notices + styles if needed.
|
||||
*/
|
||||
public function add_notices() {
|
||||
if ( get_option( '_sp_needs_welcome' ) == 1 ) {
|
||||
$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' ) );
|
||||
}
|
||||
|
||||
$notices = get_option( 'sportspress_admin_notices', array() );
|
||||
|
||||
if ( ! empty( $_GET['hide_theme_support_notice'] ) ) {
|
||||
$notices = array_diff( $notices, array( 'theme_support' ) );
|
||||
update_option( 'sportspress_admin_notices', $notices );
|
||||
@@ -73,12 +74,7 @@ class SP_Admin_Notices {
|
||||
* Show the install notices
|
||||
*/
|
||||
public function install_notice() {
|
||||
$screen = get_current_screen();
|
||||
|
||||
// If we have just installed, show a message with the install pages button
|
||||
if ( get_option( '_sp_needs_welcome' ) == 1 && $screen->id != 'toplevel_page_sportspress' ) {
|
||||
include( 'views/html-notice-install.php' );
|
||||
}
|
||||
include( 'views/html-notice-install.php' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user