I want to add a PHP str_replace
to the add_filter('the_content')
function. I believe my problem is that the shortcodes are loading after the str_replace
is called.
I have a shortcode that outputs a form, i want to make it that in all HTML form tags, the attribute autocomplete="off"
.
Heres the code i have.
add_filter('the_content', 'disable_autocomplete');
function disable_autocomplete( $content )
{
return str_replace('<form', '<form autocomplete="off"', $content);
}
Any ideas?