[wp-trac] [WordPress Trac] #23040: Expand __get() method of WP_Theme object

WordPress Trac noreply at wordpress.org
Fri Dec 21 22:28:32 UTC 2012


#23040: Expand __get() method of WP_Theme object
--------------------------------------+------------------------------
 Reporter:  wpsmith                   |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Themes                    |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  2nd-opinion dev-feedback  |
--------------------------------------+------------------------------

Comment (by nacin):

 The doc block for `__get()` says it is "for properties formerly returned
 by current_theme_info()". What it should also mention is this is
 deprecated functionality. So is `offsetExists()`, which implements
 ArrayAccess.

 `get()` and `display()` are the proper methods to use. The property
 (`$theme->property`) and key (`$theme['property']`) ways of getting data
 should realistically be deprecated, as they have ambiguous and
 inconsistent behavior.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23040#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list