Hook for when comment added to blog post (1 post)

  1. fadyboy
    Posted 2 years ago #


    I'm trying to write a plugin that pops up a message window when a comment is posted to a blog post. At the moment I'm using the action hook

    add_action("wp_insert_comment", "function_name");
    function function_name(){
        echo "<script>
                  mywindow = window.open('http://www.twitter.com', ' ',     'width=300,height=500');

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    When I post a comment to a blog post I expect the twitter window to pop up but nothing happens. Any help will be appreciated.



Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by minimundodelbebe
  • This topic is not resolved
  • WordPress version: 3.5.1