• I’m modifying an existing plugin which has a routine – AddHeaderContent – that adds some javascript code that displays rotating quotes. The main code has the line below, which i think adds the javascript (and the quotes) to every page.

    add_action(‘wp_head’, array(&$quoteRotator, ‘addHeaderContent’));

    It works, but doesn’t seem very efficient. It would be better to only do it when the shortcode exists on the page.

    Any ideas on how to do that/if possible. Must be, right?

    thanks for your time.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘question about add_action’ is closed to new replies.