From 3e6a2ac351c226ac4c8b40a9cb85939cd452fa38 Mon Sep 17 00:00:00 2001 From: khromov Date: Wed, 2 Apr 2014 13:13:08 +0200 Subject: [PATCH] Add a filter so that you can hide admin notification The admin notification "MinQueue helper is currently active" can be pretty annoying. I propose we add a filter to let theme authors and plugin developers remove this notice from the admin dashboard. Here is how you would do that with the proposed change, from a plugin or theme: ```php add_filter('minqueue_disable_helper_notice', function($var) { return true; }); ``` --- class.minqueue-admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class.minqueue-admin.php b/class.minqueue-admin.php index bd18315..8e1ff7a 100644 --- a/class.minqueue-admin.php +++ b/class.minqueue-admin.php @@ -321,7 +321,7 @@ function display_admin_notices() { $current_screen = get_current_screen(); - if ( isset( $this->options['helper'] ) && $this->options['helper'] === true ) + if ( isset( $this->options['helper'] ) && $this->options['helper'] === true && !apply_filters('minqueue_disable_helper_notice', false)) $this->admin_notices->add_notice( 'MinQueue helper is currently active', true ); @@ -363,4 +363,4 @@ function get_cached_files_count() { } -} \ No newline at end of file +}