[Plugin: Art Direction] duplicate art direction data? should bind to wp_head not the_content
-
i noticed this behavior on a page where i use apply_filters(‘the_content’,$foo) elsewhere in a template.
since art direction’s insert/replace function (“art_inline”) is bound to the_content, if the_content is called more than once, art direction’s replace/embed code is executed more than once (i was noticing that my art direction values were injected into the head multiple times)
i changed line 31 of art-direction.php from:
add_action(‘the_content’, ‘art_inline’);
to:
add_action(‘wp_head’, ‘art_inline’);
now it’s only executed once.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: Art Direction] duplicate art direction data? should bind to wp_head not the_content’ is closed to new replies.