]> git.mxchange.org Git - friendica-addons.git/blobdiff - wppost/wppost.php
updated some descriptions
[friendica-addons.git] / wppost / wppost.php
old mode 100644 (file)
new mode 100755 (executable)
index 235aa82..6db0d94
@@ -2,6 +2,7 @@
 
 /**
  * Name: WordPress Post Connector
+ * Description: Post to WordPress (or anything else which uses blogger XMLRPC API)
  * Version: 1.0
  * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
  */
@@ -168,9 +169,9 @@ function wppost_send(&$a,&$b) {
 
                require_once('include/bbcode.php');
 
-               $post = (($b['title']) ? '<title>' . $b['title'] . '</title>' : '');
-               $post .= bbcode($b['body']);
-                       $post = xmlify($post);
+               $title = '<title>' . (($b['title']) ? $b['title'] : t('Post from Friendica')) . '</title>';
+               $post = $title . bbcode($b['body']);
+               $post = xmlify($post);
 
                $xml = <<< EOT
 
@@ -193,7 +194,7 @@ EOT;
 
                if($wp_blog !== 'test')
                        $x = post_url($wp_blog,$xml);
-               logger('posted to wordpress');
+               logger('posted to wordpress: ' . ($x) ? $x : '');
 
        }
 }