4

Possible Duplicate:
How to execute conditional script when on new customize.php (Theme Customize) screen

Is there a Conditional Tag, or any other method, that we can use to check if we are customizing the theme?

I want to include some extra stylesheet while customizing the theme.

so I'd like to have sth like:

if ( theme-customizer-is-active ) {
    // load some extra styles
}
3
  • Don't understand this question at all. How are you defining "customizing the theme"
    – anu
    Jul 17, 2012 at 8:33
  • I mean the new feature by wordpress 3.4. "theme customizer".
    – xsonic
    Jul 17, 2012 at 16:09
  • But I already resolved it by this Question: link
    – xsonic
    Jul 17, 2012 at 16:11

1 Answer 1

7

As in this question: How to execute conditional script when on new customize.php (Theme Customize) screen

global $wp_customize;
if ( isset( $wp_customize ) ) {
    // do stuff
}
2
  • 10
    The conditional is_customize_preview() can be used since WordPress 4.0
    – Tim
    Mar 13, 2015 at 19:38
  • 2
    Link to is_customize_preview();
    – iki_xx
    Nov 27, 2015 at 20:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.