Forked from wpchannel/mu-yoast-seo-disable-notifications.php
Created
May 4, 2016 23:03
-
-
Save nucab/e489076be259e680be3b30713ac0bd80 to your computer and use it in GitHub Desktop.
Hide annoying notifications after each upgrade of Yoast SEO plugin and others admin 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 if (!defined('ABSPATH')) die('Restricted Area'); | |
/* | |
* Plugin Name: Disable Yoast SEO Notifications | |
* Description: Hide annoying notifications after each upgrade of Yoast SEO plugin and others admin notices. | |
* Version: 1.1 | |
* Author: Aurélien Denis | |
* Author URI: http://wpchannel.com/ | |
*/ | |
add_action('admin_init', 'wpc_disable_yoast_notifications'); | |
function wpc_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