| Versionen | |
|---|---|
| drupal6 – drupal7 | blogapi_blogger_title(&$contents) |
For the blogger API, extract the node title from the contents field.
modules/
<?php
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;
}
?>
Kommentare
Kommentar hinzufügen