[wp-trac] [WordPress Trac] #38630: Discourage usage of legacy properties in WP_Site

WordPress Trac noreply at wordpress.org
Wed Dec 7 17:20:39 UTC 2016


#38630: Discourage usage of legacy properties in WP_Site
-----------------------------------+------------------------
 Reporter:  flixos90               |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  4.8
Component:  Networks and Sites     |     Version:  4.5
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  multisite
-----------------------------------+------------------------
Changes (by flixos90):

 * keywords:  has-patch => has-patch 2nd-opinion


Comment:

 In [attachment:38630.2.diff] I adjusted the `to_array()` method to be
 backward-compatible, but at the same time deprecated it.

 The method is (as far as I can see) only called in `wp_get_sites()` which
 is already deprecated, and it is easily possible to achieve the same
 effect (only with the new properties instead) by using `get_object_vars(
 $site )`. We should probably discuss this change soon (as deprecations
 should happen early in the cycle), and it would definitely need to be
 highlighted in a multisite dev note.

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


More information about the wp-trac mailing list