Index: /trunk/include/include_xoops_define.php
===================================================================
--- /trunk/include/include_xoops_define.php	(revision 90)
+++ /trunk/include/include_xoops_define.php	(revision 91)
@@ -72,4 +72,16 @@
 }
 
+function is_wp_cron_call(){
+	$xpress_root_index = basename(dirname(dirname( __FILE__ ))) . '/wp-cron.php';
+	$php_script_name = $_SERVER['SCRIPT_NAME'];
+	if (strstr($php_script_name,$xpress_root_index) !== false) return true; else  return false;
+}
+
+
+if (is_wp_cron_call() ){
+	$_SERVER['HTTP_REFERER'] = 'http://'. $_SERVER[HTTP_HOST]  . $_SERVER['PHP_SELF'];
+	$_SERVER['REQUEST_METHOD'] = 'POST';
+}
+
 if (is_media_upload_page_call() ){
 	if ( !defined("XOOPS_ROOT_PATH") ) {
Index: /trunk/wp-content/plugins/xpressme/include/notify_functions.php
===================================================================
--- /trunk/wp-content/plugins/xpressme/include/notify_functions.php	(revision 90)
+++ /trunk/wp-content/plugins/xpressme/include/notify_functions.php	(revision 91)
@@ -1,9 +1,12 @@
 <?php
 	
-function onaction_publish_post_notify($post_id)
+function onaction_publish_post_notify($new_status, $old_status, $post)
 {
-	include_once ABSPATH . '/include/notification.inc.sub.php';
-	do_PostNotifications($post_id,'newpost');
+	if ($new_status == 'publish'){
+		include_once dirname(__FILE__) . '/notification.inc.sub.php';
+		do_PostNotifications($post->ID,'newpost');
+	}
 }
+
 function onaction_edit_post_notify($post_id)
 {
Index: /trunk/wp-content/plugins/xpressme/xpressme.php
===================================================================
--- /trunk/wp-content/plugins/xpressme/xpressme.php	(revision 90)
+++ /trunk/wp-content/plugins/xpressme/xpressme.php	(revision 91)
@@ -39,5 +39,5 @@
 //XOOPS notifiction
 require_once dirname( __FILE__ ).'/include/notify_functions.php' ;
-add_action("private_to_published",	"onaction_publish_post_notify");
+add_action("transition_post_status",	"onaction_publish_post_notify" ,10 , 3);
 //	add_action("edit_post",	"onaction_edit_post_notify");
 add_action("comment_post",	"onaction_comment_notify");
