You are here

public function GatherContentFunctions::getPageTitleArray in GatherContent 7.2

Get page title for media import page.

1 call to GatherContentFunctions::getPageTitleArray()
GatherContentFunctions::getMediaAjaxOutput in includes/functions.inc
Used during media import to return output array containing file details.

File

includes/functions.inc, line 16
Class containing general functions used throughout the importing. Extended by GatherContentCurl.

Class

GatherContentFunctions
@file Class containing general functions used throughout the importing. Extended by GatherContentCurl.

Code

public function getPageTitleArray($post_id) {
  $data = array();
  $post = node_load($post_id);
  $title = isset($post->title) ? $post->title : '';
  $title = empty($title) ? '(no title)' : $title;
  $data['original_title'] = check_plain(strip_tags($title));
  if (strlen($title) > 30) {
    $title = substr($title, 0, 27) . '...';
  }
  $data['page_title'] = $title;
  return $data;
}