[wp-trac] [WordPress Trac] #36717: Allow to access network and site properties using the current naming conventions
WordPress Trac
noreply at wordpress.org
Mon Jun 6 17:51:03 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: 4.6
Component: Networks and Sites | Version: 4.5
Severity: normal | Resolution:
Keywords: has-patch | Focuses: multisite
--------------------------------+------------------------
Comment (by flixos90):
Replying to [comment:12 jeremyfelt]:
> [attachment:36717.4.diff] casts the new properties to `int` on get and
all ID properties to `string` on set.
>
> This seems nice for `WP_Site` because we'll have `id` and `network_id`
and both will be `int`. It seems less nice for `WP_Network` because `id`
will still be a string and only `site_id` would be `int`.
Hmm, that's really unfortunate. We should probably still stick with using
`int` for the other properties. If we only had decided for using `ID`
instead of `id` for the new standards... ;) But yeah, I guess it has to
remain a string then.
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36717#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list