kalponikoronno

remove Plugin Update Notice

Jun 11th, 2020
947
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. /* Function which remove Plugin Update Notices – Ajax Search Pro, Elementor Pro, Perfmatters plugins*/
  2. function disable_plugin_updates( $value ) {
  3.     unset( $value->response['elementor-pro/elementor-pro.php'] );
  4.     unset( $value->response['header-footer-elementor/header-footer-elementor.php'] );
  5.    return $value;
  6. }
  7. add_filter( 'site_transient_update_plugins', 'disable_plugin_updates' );
  8.  
  9. /**
  10.  * Disable individual theme update notification WordPress
  11.  */
  12. function disable_theme_update_notification( $value ) {
  13.     if ( isset( $value ) && is_object( $value ) ) {
  14.         unset( $value->response['astra'] );
  15.     }
  16.     return $value;
  17. }
  18. add_filter( 'site_transient_update_themes', 'disable_theme_update_notification' );
Advertisement
Add Comment
Please, Sign In to add comment