function facebook_pull_preprocess_facebook_pull_notes in Facebook Pull 7.3
Same name and namespace in other branches
- 7 facebook_pull.module \facebook_pull_preprocess_facebook_pull_notes()
- 7.2 facebook_pull.module \facebook_pull_preprocess_facebook_pull_notes()
Implements hook_preprocess_HOOK().
File
- ./
facebook_pull.module, line 400 - Facebook Pull Module for getting content from Facebook graph.
Code
function facebook_pull_preprocess_facebook_pull_notes(&$variables) {
if ($variables['feedid']) {
global $is_https;
$scheme = $is_https ? 'https' : 'http';
$variables['picture'] = "{$scheme}://graph.facebook.com/{$variables['feedid']}/picture";
$variables['feedid'] = check_plain($variables['feedid']);
}
if ($variables['items']) {
foreach ($variables['items'] as &$item) {
if (isset($item->link['href'])) {
$item->link['href'] = check_url($item->link['href']);
}
if (isset($item->summary)) {
$item->summary = check_plain($item->summary);
}
if (isset($item->published)) {
$item->published = check_plain($item->published);
}
if (isset($item->title)) {
$item->title = check_plain($item->title);
}
}
}
}