You are here

function blogapi_blogger_extract_title in Blog API 7.2

Extract the node title from the contents field.

2 calls to blogapi_blogger_extract_title()
blogapi_blogger_new_post in modules/blogapi_blogger/blogapi_blogger.module
Service callback for blogger.newPost
blogapi_edit_post in ./blogapi.module
Service allback for metaWeblog.editPost

File

modules/blogapi_blogger/blogapi_blogger.module, line 440
Provides Blogger services for BlogAPI

Code

function blogapi_blogger_extract_title($contents) {
  if (preg_match('/<p>(.*?)<\\/p>/i', $contents, $title)) {
    return strip_tags($title[0]) . "\n\n";
  }
  return '';
}