| 5 blogapi.module | blogapi_blogger_title(&$contents) |
| 6 blogapi.module | blogapi_blogger_title(&$contents) |
For the blogger API, extract the node title from the contents field.
2 calls to blogapi_blogger_title()
File
- modules/
blogapi.module, line 531 - 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;
}
Login or register to post comments