function blogapi_blogger_title in Drupal 4
Same name and namespace in other branches
- 5 modules/blogapi/blogapi.module \blogapi_blogger_title()
- 6 modules/blogapi/blogapi.module \blogapi_blogger_title()
For the blogger API, extract the node title from the contents field.
2 calls to blogapi_blogger_title()
- blogapi_blogger_edit_post in modules/
blogapi.module - Blogging API callback. Modifies the specified blog node.
- blogapi_blogger_new_post in modules/
blogapi.module - Blogging API callback. Inserts a new blog post as a node.
File
- modules/
blogapi.module, line 545 - Enable users to post using applications that support XML-RPC blog APIs.
Code
function blogapi_blogger_title(&$contents) {
if (eregi('<title>([^<]*)</title>', $contents, $title)) {
$title = strip_tags($title[0]);
$contents = ereg_replace('<title>[^<]*</title>', '', $contents);
}
else {
list($title, $contents) = explode("\n", $contents, 2);
}
return $title;
}