-
Notifications
You must be signed in to change notification settings - Fork 430
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
Resetting dismiss message status to false #174
Comments
Ahh, thanks for catching that! I should probably add a new parameter called "id" that will allow you to add a unique ID, and I can use that for the setting so that multiple notifications are not closed when one notice is dismissed. As for the strict notice, you are not calling it correctly. You need to call it like this:
The |
Sweet, thanks, Thomas. Will do that. |
I am using TGM in a plugin, and I noticed once I dismiss the message, it's gone forever. I wold like to provide a way for the user to re-enable it. Probably via a plugin action link. For that, I need method.
So, I looked in the code, found update_dismiss(). But if I read that correctly, it will reset for every installed theme or plugin that is also using TGM. That might not be so popular if I do that!
So, how do I tell it to just reset for my plugin? Does the user meta also track individually for each theme and plugin? Or would I have to manually mange that using a different variable instead of tgmpa_dismissed_notice.
If not, would it be possible to add to the global configuration options one to override that name with our own?
Further, when I call
I get a Strict notice about calling non-static methods statically, so am having to duplicate the code in that method, which I'd rather not do - even though it is only one line. (I find some client PHP installs are have Strict notices enabled, so I need make sure my plugins don't generate any)
Thanks
BTW This is the most useful add on ever!
The text was updated successfully, but these errors were encountered: