Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm facing the same situation. The customize_save works BEFORE the options are saved, so that's out. I've emailed Otto (ottodestruct.com) about it.</p> <p>The solution I have right now is as follows:</p> <pre><code>add_action('customize_save', 'regenCSS', 100); function regenCSS( $wp_customize ) { checkCSSRegen(); // Checks if I need to regen and does so set_theme_mod('regen-css', time()+3); // Waits 3 seconds until everything is saved } function checkCSSRegen() { if (get_theme_mod('regen-css') != "" &amp;&amp; get_theme_mod('regen-css') &lt; time()) { makecss(); remove_theme_mod('regen-css'); } } </code></pre> <p>I also add an extra checkCSSRegen(); to my customize_controls_init function.</p> <p>Again, this is a little bit of a hack. Unfortunately, it's the best I can find to do at the time.</p> <p>Another option would be to use a ajax response that just pings a php file. That feels even more of a hack than this.</p> <p>Another quick hack would be to do a javascript action that when the save button is clicked, it sets a timer to delay a call to a PHP file that runs the compile. That is VERY hacky to me. </p> <p>The only fallback of the above, is unless the customizer is reloaded or another value saved, you may not get all the values you want.</p> <p>Anyone else have a better idea?</p> <p>** Update ** Just added the following request to the Wordpress team. Hopefully we'll get it squeezed in there.</p> <p><a href="http://wordpress.org/ideas/topic/do-customize_save-action-hook-after-the-settings-are-saved?replies=3#post-24853" rel="noreferrer">http://wordpress.org/ideas/topic/do-customize_save-action-hook-after-the-settings-are-saved?replies=3#post-24853</a></p> <p><strong>* Update 2 *</strong> Looks like it will be in the 3.6 release as customize_save_after. Guess a few tweets and example code can make stuff happen even with the Wordpress team. ;)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload