You are here

function blogapi_blogger_extract_body in Blog API 7.2

Extract the first paragraph from content.

2 calls to blogapi_blogger_extract_body()
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 451
Provides Blogger services for BlogAPI

Code

function blogapi_blogger_extract_body($contents) {

  //  return preg_replace('/<p>(.*?)<\/p>/i', '', $contents);
  return preg_replace('~<p>.*?</p>~s', '', $contents, 1);
}