[wp-trac] [WordPress Trac] #36717: Allow to access network and site properties using the current naming conventions

WordPress Trac noreply at wordpress.org
Tue May 3 17:07:27 UTC 2016


#36717: Allow to access network and site properties using the current naming
conventions
-----------------------------------+------------------------------
 Reporter:  flixos90               |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Networks and Sites     |     Version:  4.5
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  multisite
-----------------------------------+------------------------------

Comment (by flixos90):

 If we include this in Core, we might also think about the following:

 Maybe we could make the existing properties (`$blog_id` and `$site_id` in
 `WP_Site` and `$blog_id` in `WP_Network`) private and only make them
 accessible through magic methods. Then we could add the new virtual
 properties into a class docblock as @property. This would allow IDEs with
 autocompletion to show the correct property names while still supporting
 the old naming conventions.

 Just an idea on top though...

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


More information about the wp-trac mailing list