[wp-trac] [WordPress Trac] #38652: Introduce singular capabilities for activating and deactivating individual plugins

WordPress Trac noreply at wordpress.org
Tue Aug 22 14:01:38 UTC 2017


#38652: Introduce singular capabilities for activating and deactivating individual
plugins
-------------------------------------------------+-------------------------
 Reporter:  johnbillion                          |       Owner:
     Type:  enhancement                          |  johnbillion
 Priority:  normal                               |      Status:  closed
Component:  Role/Capability                      |   Milestone:  4.9
 Severity:  normal                               |     Version:
 Keywords:  has-patch has-unit-tests granular-   |  Resolution:  fixed
  capabilities                                   |     Focuses:
-------------------------------------------------+-------------------------
Changes (by johnbillion):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"41290"]:
 {{{
 #!CommitTicketReference repository="" revision="41290"
 Plugins: Introduce singular capabilities for activating and deactivating
 individual plugins.

 This introduces the following meta capabilities:

 * `activate_plugin`
 * `deactivate_plugin`
 * `deactivate_plugins`

 The singular `activate_plugin` and `deactivate_plugin` capabilities are
 used along with the corresponding plugin name when
 determining whether or not a user can activate or deactivate an individual
 plugin.

 The plural `deactivate_plugins` capability is used in place of the
 existing `activate_plugins` capability when determining
 whether a user can deactivate plugins.

 Each of these new meta capabilities map to the existing `activate_plugins`
 primitive capability, which means there is no
 change in existing behaviour, but plugins can now filter the capabilities
 required to activate and deactivate individual
 plugins.

 Fixes #38652
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38652#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list