+ if(! $wp_enable)
+ return;
+
+ if(strlen($b['postopts']))
+ $b['postopts'] .= ',';
+ $b['postopts'] .= 'wppost';
+}
+
+
+
+
+function wppost_send(&$a,&$b) {
+
+ if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
+ return;
+
+ if(! strstr($b['postopts'],'wppost'))
+ return;
+
+ if($b['parent'] != $b['id'])
+ return;
+
+
+ $wp_username = xmlify(get_pconfig($b['uid'],'wppost','wp_username'));
+ $wp_password = xmlify(get_pconfig($b['uid'],'wppost','wp_password'));
+ $wp_blog = get_pconfig($b['uid'],'wppost','wp_blog');
+
+ if($wp_username && $wp_password && $wp_blog) {