Guest User

Untitled

a guest
Jul 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. function mkp_section_header_link($atts)
  2. {
  3. extract(lAtts(array(
  4. 'flavor' => 'rss',
  5. 'section' => ''
  6. ),$atts));
  7.  
  8. $section = (!($section)) ? $GLOBALS["s"] : $section;
  9.  
  10. $rs = safe_row("title","txp_section","name = '$section' limit 1");
  11. $sectionname = (empty($rs["title"])) ? $s.' ' : $rs["title"].' ';
  12. $sitesection = urlencode($section);
  13.  
  14. if($flavor=='atom') {
  15. $out = '<link rel="alternate" type="application/atom+xml" '
  16. .'title="'.$sectionname.'Atom 1.0" href="'.hu.$sitesection.'/'.$flavor.'" />';
  17. } else {
  18. $out = '<link rel="alternate" type="application/rss+xml" '
  19. .'title="'.$sectionname.'RSS 0.92" href="'.hu.$sitesection.'/'.$flavor.'" />';
  20. }
  21.  
  22. return $out;
  23. }
Add Comment
Please, Sign In to add comment