function blogapi_blogger_new_post in Blog API 7.2
Same name and namespace in other branches
- 8 modules/blogapi_blogger/blogapi_blogger.module \blogapi_blogger_new_post()
- 7 blogapi.module \blogapi_blogger_new_post()
Service callback for blogger.newPost
1 string reference to 'blogapi_blogger_new_post'
- blogapi_blogger_services_resources in modules/
blogapi_blogger/ blogapi_blogger.module - Implements hook_services_resources().
File
- modules/
blogapi_blogger/ blogapi_blogger.module, line 374 - Provides Blogger services for BlogAPI
Code
function blogapi_blogger_new_post($appid, $blogid, $username, $password, $content, $publish) {
$postdata = array(
'type' => $blogid,
'status' => $publish,
'title' => blogapi_blogger_extract_title($content),
'body' => blogapi_blogger_extract_body($content),
);
$node_id = blogapi_new_post($username, $password, $postdata);
if (is_numeric($node_id)) {
// If this operation is successful, we're supposed to return a string from
// blogger.newPost.
return (string) $node_id;
}
else {
// Otherwise, there is a problem, so just pass through what we got back from
// blogapi_new_post().
return $node_id;
}
}