blogapi_blogger_title

Definition

blogapi_blogger_title(&$contents)
blogapi/blogapi.module, line 534

Description

For the blogger API, extract the node title from the contents field.

Code

<?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;
}
?>