-
Notifications
You must be signed in to change notification settings - Fork 22
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
MultiSite - Scoping Dismissal to Blog or Site #37
Comments
Note: I've temporarily hard-coded to use the "get_option" and "update_option" - ideally this would be configurable based on scope to avoid issues when updating etc. |
Nice idea. Feel free to submit a PR |
+1 for this feature. I have Multisite installs, that have very different websites, where it makes no sense to dismiss the notifications globally. I suggest to go back to get_option and update_option by default and we can add a new attribute next to data-dismissible, like data-dismissible-network, which could have the "yes" or "global" value. If this attribute is defined, only than should we use the get_site_option and update_site_option functions. Example code: If this solutions is something you like, I can make a PR with this modification. Let me know! |
Hey guys, just checking out your plugin for persistent, dismissable admin notices. I spotted that your using "get_site_option" and "update_site_option" which will indeed cover both standalone and multisite implementation of WordPress. However, if on a Multisite install you want to scope the dismissal to each blog, not the site as a whole using those functions will prevent that use case.
Was thinking maybe an additional argument / option for scope e.g. "site" / "blog" which could be used to conditionally call the required option functions. (Noting that this would also require extending the jquery routine to pop the scope also.)
Any appetite for that change?
The text was updated successfully, but these errors were encountered: