[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:18:21 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 nacin):

 Replying to [comment:4 scribu]:
 > Won't that get weird when you replace WP_Customize with your own
 instance? (If you can't replace it with your own instance, what's the
 point of having an instance at all?)

 WP_Customize is basically just a namespace. In that situation, $this is
 convenient, more so over a group of static methods. At the moment,
 WP_Customize is final. Even if it weren't made final, we could do
 something to avoid instance overwriting.

 Ultimately, getting the instance from WP_Customize just isn't needed in
 common practice. You'd only need it if you need to unhook something. So
 it's good to provide a basic interface. But we don't need to go crazy with
 it. Whatever works, I'm happy with.

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


More information about the wp-trac mailing list