Clean way of using ob_start() and ob_end_clean() in wordpress
I want to pass some json data to JS from wordpress(PHP) and was thinking to use ob_start()
and ob_end_clean()
in wordpress but i am not sure weather any other plugins are using the same functions. I was thinking to manually add ob_start()
at the beginning of the theme header and clear the document when necessary. I thought of using grep find if there are any ob_start()
in wordpress, but i can't grep find everytime my website gets updated. Are there any workarounds? I will be calling ob_end_clean()
from a shortcode.
Topic function-exists shortcode Wordpress
Category Web