Created
December 4, 2010 23:46
-
-
Save jhaus/728610 to your computer and use it in GitHub Desktop.
remotely edit wordpress posts via: http://bit.ly/gyHw5K
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Update a Selected Post | |
$title= "Updated Title"; // The Title of the Post | |
$bodycontent="Updated Blog Article Content"; // Article Content | |
$categoriesu= array('Category1', 'Category2'); // Pre Existing Categories - Updated | |
$tagsu="tag1, tag2, $tag3"; // Updated Tags | |
$content = array('title'=>$title, 'description'=>$bodycontent,'categories'=>$categoriesu,'mt_keywords'=>$tagsu); | |
$params = array(163,$username,$password,$content,1); // First Parameter is mandatory Post Id (get your post id via Recent Blogs entries) | |
// Run a query for PHP | |
if (!$client->query('metaWeblog.editPost', $params)) { | |
die('Something went wrong - '.$client->getErrorCode().' : '.$client->getErrorMessage()); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment