Closed jrfnl closed 8 years ago
The PR now has conflicts.
Rebased.
@GaryJones re: both your remarks - for this bit, all I really did was abstract a block of code out to a new method as what with the other extra if's and indents, the notices()
function became even more unwieldy than it already was. I didn't actually change the code within the block (other than adding a return).
So variable names, conditions etc are all as they were.
FYI: this whole block of functionality will be removed in my current plan for 3.0 as it won't be needed anymore.
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" noticesThe 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:
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: INN/Largo#740 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.