Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide recommended version admin notice #22

Open
pderksen opened this issue Mar 17, 2015 · 5 comments
Open

Hide recommended version admin notice #22

pderksen opened this issue Mar 17, 2015 · 5 comments
Milestone

Comments

@pderksen
Copy link

It would be nice to see a "hide this" button or link next to the admin notice for the recommended version.

This of course would hide the message forever or at least until a plugin update.

Love this library!

Implementing it today for Simple Stripe Checkout since Stripe PHP (which the plugin includes) now requires PHP 5.3.3 and broke a few user sites who were running PHP 5.2.

@coenjacobs
Copy link
Member

Good point. The recommended PHP version notice definitely needs a way (optionally?) to dismiss it, since that will be there for ever and always if the plugin remains active. I don't mind the required version notice to stick forever, as that requires the act of updating the PHP version before it can be used and then the notice will go away automatically anyway.

@pderksen
Copy link
Author

Agreed. In some plugins I save a setting for admin notices the user chooses to hide, but I'm not sure of what's best here for a drop-in library.

@afragen
Copy link
Contributor

afragen commented Apr 4, 2015

In WP 4.2 all that's needed is to add .notice .is-dismissible classes to the admin notice.

@pderksen
Copy link
Author

pderksen commented Apr 6, 2015

@afragen That's a great add. I didn't realize WP 4.2 included that until you pointed it out.

Is there a built-in way to make a dismiss action persistent though? Like a hide/dismiss forever sort of thing? That's where I've elected to save a setting for this in some of my plugins.

@coenjacobs
Copy link
Member

Yeah, we'll need to attach an onClick event to that link. Documented in this post on Make.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants