[wp-hackers] hooks & future posts
    Ozh 
    ozh at planetozh.com
       
    Sat Sep 19 16:42:23 UTC 2009
    
    
  
>> (or: how can I catch it when a post goes from 'future' to 'publish')
>
> Write to a file?
not much more caught...
add_action('future_to_publish', 'do_stuff');
add_action('publish_post', 'do_stuff');
function do_stuff( $in ) {
  $f = fopen( dirname(__FILE__).'/log.log', 'a' );
  fwrite( $f, print_r($in, true) );
  fclose( $f );
  return $in;
}
File log.log is created normally if I publish a post, but nothing
happens if I schedule one.
Pulling my hair.
-- 
http://planetOzh.com ~ Blog and WordPress Stuff
http://FrenchFragFactory.net ~ Daily Quake News
    
    
More information about the wp-hackers
mailing list