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

WordPress Trac noreply at wordpress.org
Wed Jun 8 03:47:39 UTC 2016


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

Comment (by jeremyfelt):

 Replying to [comment:13 flixos90]:
 > Another note, do we really need the default clause in the switch
 statement in the setter? I included it in my initial patch, but looking at
 it now, I don't think we need to set something there.

 I thought not too, but we have a few dynamic properties for `WP_Site` that
 we don't yet include as part of the "official" object.
 `get_blog_details()` assigns `blogname`, `siteurl`, `post_count`, and
 `home`. Because these are there, we need some kind of default to fall back
 on.

 `WP_Network` doesn't have this restriction, but I'm wary of being strict
 due to the possible existing uses of `$current_site` out in the wild.

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


More information about the wp-trac mailing list