function og_opml in Organic groups 6
Same name and namespace in other branches
- 5.8 og.module \og_opml()
- 5 og.module \og_opml()
- 5.2 og.module \og_opml()
- 5.3 og.module \og_opml()
- 5.7 og.module \og_opml()
- 6.2 og.module \og_opml()
File
- ./
og.module, line 1210
Code
function og_opml() {
$output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
$output .= "<opml version=\"1.1\">\n";
$output .= "<head>\n";
$output .= '<title>' . check_plain(variable_get('site_name', 'Drupal')) . "</title>\n";
$output .= '<dateModified>' . gmdate('r') . "</dateModified>\n";
$output .= "</head>\n";
$output .= "<body>\n";
global $user;
foreach ($user->og_groups as $gid => $group) {
$output .= '<outline text="' . check_plain($group['title']) . '" xmlUrl="' . url("node/{$gid}/feed", array(
'absolute' => TRUE,
)) . "\" />\n";
}
$output .= "</body>\n";
$output .= "</opml>\n";
drupal_set_header('Content-Type: text/xml; charset=utf-8');
print $output;
}