-
Notifications
You must be signed in to change notification settings - Fork 427
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
Filter for disabling the notice box? #190
Comments
@khromov PR #247 makes it so that on multisite, the notices are only shown in the network admin. Hope this helps a bit. Feel free to +1 it if you approve of the PR. Oh and to completely disable the admin notices, just change |
jrfnl
added a commit
that referenced
this issue
Jan 5, 2016
By default the following logic will be used: User < 'publish_posts': no admin notices User < install/update/activate: "contact administrator notice" without disclosing information about the plugins involved and only if there are *required* plugins which require action. User = install/update/activate: "normal" notices The minimum user level for which admin notices are shown at all can be adjusted by using the newly introduced `tgmpa_show_admin_notice_capability` filter. The default is set to 'publish_posts', i.e. Authors. Example: add_filter( 'tgmpa_show_admin_notice_capability', create_function( '$cap', 'return \'edit_pages\';' ) ); To only show the admin notices to network admins on multisite, set it to a super admin capability like 'manage_network_plugins'. Note: the `notices()` function is ugly and in desperate need of refactoring, that is not handled in this PR (which only makes it worse). Fixes #190, #414 Supersedes: https://github.com/INN/Largo/pull/740/files Partially fixes #479, #489 - notice will now only show for required updates for non-admin users with level author or editor. Possibly fixes #492, though more information is needed on the actual case.
jrfnl
added a commit
that referenced
this issue
Jan 5, 2016
By default the following logic will be used: User < `'publish_posts'` (=Author): no admin notices User < install/update/activate: "contact administrator notice" without disclosing information about the plugins involved and only if there are *required* plugins which require action. User = install/update/activate: "normal" notices The minimum user level for which admin notices are shown at all can be adjusted by using the newly introduced `tgmpa_show_admin_notice_capability` filter. The default capability is set to `'publish_posts'`. Example: add_filter( 'tgmpa_show_admin_notice_capability', create_function( '$cap', 'return \'edit_pages\';' ) ); Another example: To only show the admin notices to network admins on multisite, set it to a super admin capability like `'manage_network_plugins'`. Note: the `notices()` function is ugly and in desperate need of refactoring, that is not handled in this PR (which only makes it worse). Fixes #190, #414 Supersedes: https://github.com/INN/Largo/pull/740/files Partially fixes #479, #489 - notice will now only show for required updates for non-admin users with level author or editor. Possibly fixes #492, though more information is needed on the actual case.
jrfnl
added a commit
that referenced
this issue
Jan 5, 2016
By default the following logic will be used: User < `'publish_posts'` (=Author): no admin notices User < install/update/activate: "contact administrator notice" without disclosing information about the plugins involved and only if there are *required* plugins which require action. User = install/update/activate: "normal" notices The minimum user level for which admin notices are shown at all can be adjusted by using the newly introduced `tgmpa_show_admin_notice_capability` filter. The default capability is set to `'publish_posts'`. Example: add_filter( 'tgmpa_show_admin_notice_capability', create_function( '$cap', 'return \'edit_pages\';' ) ); Another example: To only show the admin notices to network admins on multisite, set it to a super admin capability like `'manage_network_plugins'`. Note: the `notices()` function is ugly and in desperate need of refactoring, that is not handled in this PR (which only makes it worse). Fixes #190, #414 Supersedes: https://github.com/INN/Largo/pull/740/files Partially fixes #479, #489 - notice will now only show for required updates for non-admin users with level author or editor. Possibly fixes #492, though more information is needed on the actual case.
Nice! 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible to add a filter for disabling the notice box? We're working on a multisite installation with a parent theme that uses TGM and we don't want it to show up on every admins profiles.
We have hooked into get_user_metadata to override the default setting value globally, but it would be better if there was a native filter available.
Here's the code we are using now:
More info:
http://snippets.khromov.se/disable-tgm-plugin-activation-nag-screen/
The text was updated successfully, but these errors were encountered: