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

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 17 16:57:15 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):

 I've had this queued up locally, just haven't committed it yet.

 Wondering if we should move this to being a static instance inside the
 WP_Customize class and avoid the unnecessary global. So,

 {{{
 new WP_Customize;
 }}}

 And:
 {{{
 public static $instance;
 function __construct() {
      self::$instance = $this;
      .  .  .
 }
 }}}

 Simple, effective. Allows for `WP_Customize::$instance`.

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


More information about the wp-trac mailing list