[wp-trac] [WordPress Trac] #24401: Add hook for after values saved in customizer

WordPress Trac noreply at wordpress.org
Thu May 23 19:58:06 UTC 2013


#24401: Add hook for after values saved in customizer
-----------------------------+-----------------------------
 Reporter:  dovyp            |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Administration   |    Version:  trunk
 Severity:  trivial          |   Keywords:
-----------------------------+-----------------------------
 Please add the following line to the the next release of WordPress.

 do_action( 'customize_save_after', $this );
 to line: 514 of class-wp-customize-manager.php



 The full function should look as follows:
 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!php

 public function save() {
                 if ( ! $this->is_preview() )
                         die;

                 check_ajax_referer( 'save-customize_' .
 $this->get_stylesheet(), 'nonce' );

                 // Do we have to switch themes?
                 if ( ! $this->is_theme_active() ) {
                         // Temporarily stop previewing the theme to allow
 switch_themes()
                         // to operate properly.
                         $this->stop_previewing_theme();
                         switch_theme( $this->get_stylesheet() );
                         $this->start_previewing_theme();
                 }

                 do_action( 'customize_save', $this );

                 foreach ( $this->settings as $setting ) {
                         $setting->save();
                 }
                 do_action( 'customize_save_after', $this );
                 die;
 }


   }}}
 }}}

 This will allow us to use a hook for after the settings from the
 customizer have been saved.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24401>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list