Created
November 22, 2017 13:54
-
-
Save nschaeferhoff/9e8f09d62c862a2cea84f58c6f5beeff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function delay_rss_feed($where) { | |
global $wpdb; | |
if ( is_feed() ) { | |
$now = gmdate('Y-m-d H:i:s'); | |
$wait = '10'; | |
$device = 'MINUTE'; | |
$where.= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait "; | |
} | |
return $where; | |
} | |
add_filter('posts_where', 'delay_rss_feed'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment