Forums

Save_post not being hooked properly? (1 post)

  1. markowe
    Member
    Posted 1 year ago #

    OK, major headscratching moment. I have:

    add_action('save_post', array(&$my_plugin_instance, 'my_plugin_save'));

    And then in the main plugin class:

    function my_plugin_save( $post_id ) {
    	echo "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
    }

    The ONLY time "aaaaaaaaaaaaa" gets echoed is when I choose New Post or New Page. Once I click Publish or Update, my_plugin_save doesn't get hooked anymore.

    Totally mystified... Anyone help?

    Mark

Topic Closed

This topic has been closed to new replies.

About this Topic