From 0f13626dab0f3fe2ce79688221bb79ae35af520d Mon Sep 17 00:00:00 2001 From: abuyoyo Date: Fri, 11 Aug 2023 22:21:36 +0300 Subject: [PATCH 1/3] Fix vendor/autoload.php include path --- notice-manager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notice-manager.php b/notice-manager.php index 4d185f6..d26b614 100644 --- a/notice-manager.php +++ b/notice-manager.php @@ -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) From c0ca10a9c0c3fbfd5af51745597e30cbb36a6884 Mon Sep 17 00:00:00 2001 From: abuyoyo Date: Fri, 11 Aug 2023 22:27:24 +0300 Subject: [PATCH 2/3] Fix - do not collect .theme-info notice --- js/notice_manager_panel.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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") /** From 24d4e54ca8b74b289252be87982adbabf3e1ec5c Mon Sep 17 00:00:00 2001 From: abuyoyo Date: Fri, 11 Aug 2023 22:33:26 +0300 Subject: [PATCH 3/3] 0.22 - version bump + changelog --- CHANGELOG.md | 6 ++++++ composer.json | 2 +- notice-manager.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) 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/notice-manager.php b/notice-manager.php index d26b614..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