[wp-trac] [WordPress Trac] #20465: Change name of global for wp_customize instance

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 17 17:24:12 UTC 2012


#20465: Change name of global for wp_customize instance
-------------------------+------------------
 Reporter:  mattonomics  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.4
Component:  Themes       |     Version:  3.4
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------

Comment (by scribu):

 Replying to [comment:5 nacin]:
 > WP_Customize is basically just a namespace. In that situation, $this is
 convenient, more so over a group of static methods.

 Why is it more convenient? Because you don't have to declare all the
 properties you set? Because it's a more familiar syntax?

 If it's a poor man's namespace, then use it as such. `$this` is only
 useful for dynamic dispatch, when you have a hierarchy of classes.

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


More information about the wp-trac mailing list