2

I have in my theme this filter:

add_filter('widget_text', 'do_shortcode');

Now I'm developing a plugin where I have that same filter. I would like to know if is there a conditional that I can check if filter is already placed? I don't want to run it twice. I don't know if that may cause any problem. I just want to play safe.

4
<?php has_filter( $tag, $function_to_check ); ?> 

http://codex.wordpress.org/Function_Reference/has_filter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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