PageRenderTime 57ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/blog/wp-content/plugins/podpress/optional_files/wp1.5_2.0/wp-atom.php

https://bitbucket.org/sergiohzlz/reportaprod
PHP | 78 lines | 72 code | 4 blank | 2 comment | 11 complexity | 9e531c402272a4be5565dbcb1ea25548 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. // This is a podPress replacement file.
  3. if (empty($wp)) {
  4. require_once('wp-config.php');
  5. wp('feed=atom');
  6. }
  7. header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
  8. //header('Content-type: application/atom+xml; charset=' . get_settings('blog_charset'), true);
  9. $more = 1;
  10. ?>
  11. <?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
  12. <feed
  13. xmlns="http://www.w3.org/2005/Atom"
  14. xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
  15. xmlns:dc="http://purl.org/dc/elements/1.1/"
  16. xml:lang="<?php echo get_option('rss_language'); ?>"
  17. <?php do_action('atom_ns'); ?>
  18. >
  19. <id><?php bloginfo_rss('atom_url') ?></id>
  20. <title><?php bloginfo_rss('name') ?></title>
  21. <link rel="self" type="application/atom+xml" href="<?php bloginfo_rss('atom_url') ?>" />
  22. <link rel="alternate" type="application/rss+xml" href="<?php bloginfo_rss('rss2_url') ?>" />
  23. <link rel="alternate" type="text/html" hreflang="<?php echo get_option('rss_language'); ?>" href="<?php bloginfo_rss('home') ?>" />
  24. <subtitle type="xhtml">
  25. <div xmlns="http://www.w3.org/1999/xhtml">
  26. <strong><?php bloginfo_rss('description') ?></strong><br /><br />
  27. Insert more <strong>info</strong> about your blog here.
  28. </div>
  29. </subtitle>
  30. <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('gmt'), false); ?></updated>
  31. <rights>Copyright <?php echo mysql2date('Y', get_lastpostdate('gmt'), false); ?> <?php bloginfo_rss('name') ?></rights>
  32. <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
  33. <generator uri="http://wordpress.org/" version="<?php bloginfo_rss('version'); ?>">WordPress</generator>
  34. <author>
  35. <name><?php bloginfo_rss('name') ?></name>
  36. <uri><?php bloginfo_rss('siteurl'); ?></uri>
  37. </author>
  38. <?php do_action('atom_head'); ?>
  39. <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
  40. <entry>
  41. <id><?php the_guid(); ?></id>
  42. <title type="html"><?php the_title_rss() ?></title>
  43. <link rel="alternate" type="text/html" hreflang="<?php echo get_option('rss_language'); ?>" href="<?php permalink_single_rss() ?>" />
  44. <link rel="related" type="application/rss+xml" href="<?php echo comments_rss(); ?>" />
  45. <author>
  46. <name><?php the_author() ?></name>
  47. <uri><?php $x = get_the_author_url(); if($x != 'http://' && $x != '') { echo $x; } else { echo bloginfo_rss('siteurl'); } ?></uri>
  48. </author>
  49. <updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', $post->post_modified_gmt, false); ?></updated>
  50. <published><?php echo get_post_time('Y-m-d\TH:i:s\Z', true); ?></published>
  51. <?php the_category_rss('rdf') ?>
  52. <rights>Copyright <?php echo get_post_time('Y', true); ?> <?php the_author() ?></rights>
  53. <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/</creativeCommons:license>
  54. <summary type="xhtml">
  55. <div xmlns="http://www.w3.org/1999/xhtml">
  56. <?php the_excerpt_rss(); ?>
  57. <br /><br />
  58. (<a href="<?php comments_link(); ?>">Comments</a>)
  59. </div>
  60. </summary>
  61. <?php if ( !get_settings('rss_use_excerpt') ) : ?>
  62. <content type="xhtml">
  63. <div xmlns="http://www.w3.org/1999/xhtml">
  64. <?php the_content('', 0, '') ?>
  65. <br /><br />
  66. (<a href="<?php comments_link(); ?>">Comments</a>)
  67. </div>
  68. </content>
  69. <?php endif; ?>
  70. <?php rss_enclosure(); ?>
  71. <?php do_action('atom_entry'); ?>
  72. </entry>
  73. <?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
  74. </feed>