Hi, i’m still writing my download manager plugin everything is ok except one problem.
I use preg_match to find the code from content (html comment like < ! — — >) and replace with html code with the download information etc.
Basically the plugin search the_content with add_filter(‘the_content’, ‘replace_code’); and i put add_action(‘wp_head’, ‘add_css’); in “my_function_one” so when the plugin works, it also add “add_css” in wp_head.
In single page, everything works great, but in the frontpage and page my “add_css” function is not executed but “replace_code” function is ok. Can someone help me about this problem? Or maybe give me some reference?
- The topic ‘How to add_action just when the plugin works??’ is closed to new replies.