[wp-trac] [WordPress Trac] #36961: wp_roles displays incorrect roles in multisite

WordPress Trac noreply at wordpress.org
Tue Sep 26 19:45:41 UTC 2017


#36961: wp_roles displays incorrect roles in multisite
-------------------------------------------------+-------------------------
 Reporter:  ryanduff                             |       Owner:  flixos90
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  4.9
Component:  Role/Capability                      |     Version:  4.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:  multisite
  note                                           |
-------------------------------------------------+-------------------------

Comment (by johnjamesjacoby):

 > Should the new $site_id property be public or private?

 I think keep it private and add a public `get_site_id()` method.

 My reasoning is if the property were public, I'd want changing it to call
 `for_site( $this->site_id )` via a magic `__set()` method, and that magic
 is outside the scope of this ticket and not present in core anywhere else.

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


More information about the wp-trac mailing list