How to use SHORTCODE_UI_DOING_PREVIEW?
-
Hi!
I’m trying to setup a different view for my shortcode on TinyMCE, like a placeholder. From what I saw, there’s the SHORTCODE_UI_DOING_PREVIEW constant to help doing that. I’m using this code on my shortcode function:
if( SHORTCODE_UI_DOING_PREVIEW ){ $html = 'PLACEHOLDER'; } else { $html = 'REAL CONTENT'; } return $html;
But the shortcode renders only the placeholder, both on TinyMCE and the frontend. Am I doing something wrong?
Thanks for any help!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to use SHORTCODE_UI_DOING_PREVIEW?’ is closed to new replies.