Created
March 9, 2016 11:34
-
-
Save nielsvr/c173f810e39c1c2ce297 to your computer and use it in GitHub Desktop.
Remove Yoast SEO upgrade notices
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// add to your functions.php | |
add_action('admin_init', 'theme_disable_yoast_notifications'); | |
function theme_disable_yoast_notifications() { | |
if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) { | |
remove_action( 'admin_notices', array( Yoast_Notification_Center::get(), 'display_notifications' ) ); | |
remove_action( 'all_admin_notices', array( Yoast_Notification_Center::get(), 'display_notifications' ) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment