You are here

function og_opml in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og.module \og_opml()
  2. 5 og.module \og_opml()
  3. 5.2 og.module \og_opml()
  4. 5.3 og.module \og_opml()
  5. 5.7 og.module \og_opml()
  6. 6.2 og.module \og_opml()
1 string reference to 'og_opml'
og_menu in ./og.module

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;
}