My personal site.
julien731 / wp-dismissible-notices-handler Goto Github PK
View Code? Open in Web Editor NEWA simple library to handle dismissible admin notices for WordPress
License: GNU General Public License v3.0
A simple library to handle dismissible admin notices for WordPress
License: GNU General Public License v3.0
I am getting this issue: https://wordpress.org/support/topic/dismissible-notices-handler-error-a-notice-with-the-id/#post-16610599
I saw also in some cases locally to get that error but it wasn't clear why. Maybe in some cases wordpress register twice the same notice.
I think that
WP-Dismissible-Notices-Handler/handler.php
Line 297 in 062b147
Update the Git repository
Packagist should catch the change and update the package automatically.
Packagist is not properly updating the package.
Packagist is sending an automatic email with additional details:
The julien731/wp-dismissible-notices-handler package of which you are a maintainer has
failed to update due to invalid data contained in your composer.json.
Please address this as soon as possible since the package stopped updating.
It is recommended that you use `composer validate` to check for errors when you
change your composer.json.
Below is the full update log which should highlight errors as
"Skipped branch ...":
[Composer\Repository\InvalidRepositoryException]: Some branches contained invalid data and were discarded, it is advised to review the log and fix any issues present in branches
Reading composer.json of julien731/wp-dismissible-notices-handler (1.2.1)
Found cached composer.json of julien731/wp-dismissible-notices-handler (1.2.1)
Reading composer.json of julien731/wp-dismissible-notices-handler (1.2.0)
Found cached composer.json of julien731/wp-dismissible-notices-handler (1.2.0)
Reading composer.json of julien731/wp-dismissible-notices-handler (1.1.0)
Found cached composer.json of julien731/wp-dismissible-notices-handler (1.1.0)
Reading composer.json of julien731/wp-dismissible-notices-handler (1.0.0)
Found cached composer.json of julien731/wp-dismissible-notices-handler (1.0.0)
Reading composer.json of julien731/wp-dismissible-notices-handler (develop)
Importing branch develop (dev-develop)
Reading composer.json of julien731/wp-dismissible-notices-handler (chore/create-pr-template)
Importing branch chore/create-pr-template (dev-chore/create-pr-template)
Skipped branch chore/create-pr-template, Invalid package information:
License "GNU GPL" is not a valid SPDX license identifier, see https://spdx.org/licenses/ if you use an open license.
If the software is closed-source, you may use "proprietary" as license.
Reading composer.json of julien731/wp-dismissible-notices-handler (master)
Found cached composer.json of julien731/wp-dismissible-notices-handler (dev-master)
It looks like the issue is with the license identifier which is not a valid SPDX identifier. The most appropriate, valid license identifier, at this point, seems to be GPL-3.0-or-later.
When on put ngt-arve-test-notice=foo
on and admin url the message shows up, but I can not dismiss it. I am not sure why this is happening. Maybe the AJAX request and the nonce fails because of the $_GET.
Annoyingly I am about to move to this thing specifically because my own solution has issues with non-disposable notices for very few users that I could not reproduce. I probably will move to it anyway because its just this specific test that fails if I remove the condition it works.
// phpcs:ignore
if ( ! empty( $_GET['ngt-arve-test-notice'] ) ) {
dnh_register_notice(
'ngt-arve-test-notice-t',
'notice-success',
wp_kses( 'This is a test notice, dismiss it and check the bottom of the Debug Info tab for ngt-arve-test-notice', [] ),
[
'cap' => 'install_plugins',
]
);
}
Since WP-Dismissible-Notices-Handler
requires php
>=5.5.0, would it be good to add a namespace?
Hi,
Thank you for this!! :) It works great!
What would be the best way to remove an existing notice from the database user_meta/options?
Hi,
How I can use your library as a composer managed dependency on a project?
I've installed it with the command composer require julien731/wp-dismissible-notices-handler=dev-master
but when I try to use the dnh_register_notice
function I get a PHP Fatal error: Call to undefined function dnh_register_notice()
.
What I'm doing wrong?
Regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.