Skip to content

Instantly share code, notes, and snippets.

@goodevilgenius
Last active February 3, 2020 11:09
Show Gist options
  • Save goodevilgenius/9786001 to your computer and use it in GitHub Desktop.
Save goodevilgenius/9786001 to your computer and use it in GitHub Desktop.
[WP atom:updated] Wordpress Plugin to add atom:updated to rss feed #Wordpress #RSS
<?php
/**
* @version 0.1
*/
/*
Plugin Name: Atom:Updated
Plugin URI: https://gist.github.com/goodevilgenius/9786001
Description: This plugin adds atom:updated to your RSS2 feed
Author: Dan Jones
Version: 0.1
Author URI: http://danielrayjones.com/
*/
function atom_updated() {
echo "<atom:updated>";
echo get_post_modified_time('Y-m-d\TH:i:s\Z', true);
echo "</atom:updated>\n";
}
add_action( 'rss2_item', 'atom_updated' );
?>
@jadealombro
Copy link

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment