diff --git a/CHANGELOG.md b/CHANGELOG.md index 82291a1..3b6e3e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Notice Manager Changelog +## 0.22 + +### Fixed +- Do not collect `.theme-info` notices. +- Fix `vendor/autoload` include path. + ## 0.21 ### Fixed diff --git a/composer.json b/composer.json index e86e701..3c32c65 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "abuyoyo/notice-manager", "description": "Manage notices on WordPress admin pages. Adds 'Notices' screen-meta-link.", "type": "wordpress-plugin", - "version": "0.21", + "version": "0.22", "repositories": [ { "type": "vcs", diff --git a/js/notice_manager_panel.js b/js/notice_manager_panel.js index d2eee9d..a9cd0ab 100644 --- a/js/notice_manager_panel.js +++ b/js/notice_manager_panel.js @@ -22,6 +22,12 @@ var NoticeManager = (function ($, document) { let selectors_all = selectors_notice.concat(selectors_warning, selectors_error) + let selectors_skip = [ + ".inline", + ".below-h2", + ".theme-info .notice", + ] + // wait function used with autoCollapse let wait = function (ms) { var dfd = $.Deferred() @@ -89,7 +95,7 @@ var NoticeManager = (function ($, document) { // get all notices that are not explicitly marked as `.inline` or `.below-h2` // we add .update-nag.inline for WordPress Update notice notices = $( selectors_all.join(', ') ) - .not(".inline, .below-h2") + .not(selectors_skip.join(', ')) .add("div.update-nag") /** diff --git a/notice-manager.php b/notice-manager.php index 4d185f6..7b3cc8d 100644 --- a/notice-manager.php +++ b/notice-manager.php @@ -2,7 +2,7 @@ /** * Plugin Name: Notice Manager * Description: Manage notices on WordPress admin pages. Adds 'Notices' screen-meta-link. - * Version: 0.21 + * Version: 0.22 * Author: abuyoyo * Author URI: https://github.com/abuyoyo/ * Plugin URI: https://github.com/abuyoyo/notice-manager @@ -12,8 +12,8 @@ defined( 'ABSPATH' ) || die( 'No soup for you!' ); use WPHelper\PluginCore; -if ( file_exists( 'vendor/autoload.php' ) ) - require_once 'vendor/autoload.php'; +if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) + require_once __DIR__ . '/vendor/autoload.php'; /** * Bootstrap plugin and admin page (Tools > Notice Manager)