[wp-trac] [WordPress Trac] #23016: Allow plugins to manipulate WP_Roles ($wp_roles global) on construct

WordPress Trac noreply at wordpress.org
Fri Oct 21 00:04:48 UTC 2016


#23016: Allow plugins to manipulate WP_Roles ($wp_roles global) on construct
-------------------------------------------------+-------------------------
 Reporter:  johnjamesjacoby                      |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  4.7
Component:  Role/Capability                      |     Version:  3.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch reporter-feedback needs-   |     Focuses:
  testing has-unit-tests                         |
-------------------------------------------------+-------------------------
Changes (by pento):

 * keywords:  dev-feedback has-patch needs-refresh needs-unit-tests => has-
     patch reporter-feedback needs-testing has-unit-tests


Comment:

 In [attachment:23016.diff]:

 * Instead of removing `WP_Roles::reinit()`, deprecate it and point it to
 `WP_Roles::_init()`, instead.
 * Add documentation for `wp_roles_init`.
 * Duplicate the `$wp_roles = new WP_Roles()` behaviour in
 `restore_current_blog()`.
 * Add unit tests.

 @johnjamesjacoby, @netweb: Before committing this, I'd like to see a
 sample implementation in bbPress, to ensure it does the job.

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


More information about the wp-trac mailing list