api fixes
This commit is contained in:
@@ -108,7 +108,7 @@ function post_to_red_post($post_id) {
|
||||
'source' => 'WordPress',
|
||||
'namespace' => 'wordpress',
|
||||
'remote_id' => $message_id,
|
||||
'permalink' => $post->guid;
|
||||
'permalink' => $post->guid
|
||||
);
|
||||
if($channel)
|
||||
$body['channel'] = $channel;
|
||||
@@ -117,6 +117,15 @@ function post_to_red_post($post_id) {
|
||||
$request = new WP_Http;
|
||||
$result = $request->request($url , array( 'method' => 'POST', 'body' => $body, 'headers' => $headers));
|
||||
|
||||
// if($result['response']['code'] == 200) {
|
||||
// $j = json_decode($result['body'],true);
|
||||
// if($j && $j['id']) {
|
||||
// // store the red id in case we need to delete it in the future.
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// logger('post_to_red returns: ' . print_r($result,true));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user