[wp-hackers] wp-hackers Digest, Vol 63, Issue 1

Elizabeth Buckwalter elizabeth at slatetechpdx.com
Thu Apr 1 03:54:21 UTC 2010


>
> Message: 6
> Date: Wed, 31 Mar 2010 17:45:17 -0700
> From: Elizabeth Buckwalter <elizabeth at slatetechpdx.com>
> Subject: [wp-hackers] Odd wp_insert_post hook behavior MU 2.9.1.1
> To: wp-hackers at lists.automattic.com
> Message-ID:
>        <s2uc399ae881003311745jdf69d11fr9756bd4db29328f1 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> In my plugin:
> ----------
> public function process_article_submit($action = '') {
>    // building up post
>    echo "inserting ";
>    $sf = wp_insert_post($post);
>    echo $sf;
> }
>
> public function cache_activity_post($pid, $post) {
>    error_log(' uuuuuuh '. print_r($pid, true));
>    //....
> }
> add_action( 'wp_insert_post', array(&$fu, 'cache_activity_post') );
>
>
>
> The post inserts as expected, but the hook does not run.  However, the hook
> is run upon delete, and apparently, doesn't pass $post.
> Any help would be appreciated.
>
> Thanks,
> Elizabeth Buckwalter
>
>

I just had a thought.  I'm using: require_once
'relative/path/to/wp-load.php';

When you use only this, do the hooks not get run?  If so, is there a way to
do that?  I'm using wp's rewrite for other stuff, would it help here, so I
can get the hooks to run?
-- 
Thanks,
Elizabeth Buckwalter


More information about the wp-hackers mailing list