[wp-trac] [WordPress Trac] #19910: Appearance Improvements: Theme Customization Frame

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 30 23:02:23 UTC 2012


#19910: Appearance Improvements: Theme Customization Frame
-------------------------------------------------+-------------------------
 Reporter:  koopersmith                          |       Owner:
     Type:  task (blessed)                       |  koopersmith
 Priority:  normal                               |      Status:  accepted
Component:  Appearance                           |   Milestone:  3.4
 Severity:  normal                               |     Version:  3.3.1
 Keywords:  dev-feedback reporter-feedback       |  Resolution:
  needs-docs                                     |
-------------------------------------------------+-------------------------
Changes (by jackmahoney):

 * keywords:   => dev-feedback reporter-feedback needs-docs


Comment:

 Replying to [comment:13 koopersmith]:
 > In [20649]:
 > {{{
 > #!CommitTicketReference repository="" revision="20649"
 > Theme Customizer: Pass the WP_Customize instance to all actions fired
 inside the class. Plugins/themes should not refer to the $wp_customize
 global. see #19910, #20448.
 > }}}
 Could you please elaborate on how a theme developer can call functions on
 WP_Customize instance? How does one instantiate it? I am using a fork of
 _s' theme and the standard Gandalf features work fine but I cannot find
 how to add my own.

 {{{
 add_action( 'customize_register' , 'my_customization_function');
 function my_customization_function(){
                 global $wp_customize;
                 //But $wp_customize is null!
                 $wp_customize->add_section( 'layout', array(
                         'title'          => __( 'Layout' ),
                         'priority'       => 20,
                 ) );
 }
 }}}

 Your help is greatly appreciated!

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


More information about the wp-trac mailing list