• Resolved squaredesign

    (@squaredesign)


    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.

    https://www.ads-software.com/extend/plugins/art-direction/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thank you very much! ??

    If you don’t want to hack the plugin, shouldn’t you be able to add something like this to your functions.php file?

    remove_action('the_content', 'art_inline');
    add_action('wp_head', 'art_inline');

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.