XPressME Integration Kit

Trac

Changeset 91 for trunk/wp-content


Ignore:
Timestamp:
Feb 13, 2009, 5:09:17 PM (16 years ago)
Author:
toemon
Message:

予約投稿のイベント通知、実装 #59

Location:
trunk/wp-content/plugins/xpressme
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/plugins/xpressme/include/notify_functions.php

    r61 r91  
    11<?php 
    22         
    3 function onaction_publish_post_notify($post_id) 
     3function onaction_publish_post_notify($new_status, $old_status, $post) 
    44{ 
    5         include_once ABSPATH . '/include/notification.inc.sub.php'; 
    6         do_PostNotifications($post_id,'newpost'); 
     5        if ($new_status == 'publish'){ 
     6                include_once dirname(__FILE__) . '/notification.inc.sub.php'; 
     7                do_PostNotifications($post->ID,'newpost'); 
     8        } 
    79} 
     10 
    811function onaction_edit_post_notify($post_id) 
    912{ 
  • trunk/wp-content/plugins/xpressme/xpressme.php

    r88 r91  
    3939//XOOPS notifiction 
    4040require_once dirname( __FILE__ ).'/include/notify_functions.php' ; 
    41 add_action("private_to_published",      "onaction_publish_post_notify"); 
     41add_action("transition_post_status",    "onaction_publish_post_notify" ,10 , 3); 
    4242//      add_action("edit_post", "onaction_edit_post_notify"); 
    4343add_action("comment_post",      "onaction_comment_notify"); 
Note: See TracChangeset for help on using the changeset viewer.