Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (430)
Testing (4)
Tools (488)
Twitter (5)
Wearable (26)
Web Design (44)
Collections:
Other Resources:
WordPress – Scheduling Posts for RSS
Useful PHP Code Snippets for Developers - WordPress – Scheduling Posts for RSS
✍: Guest
function publish_later_on_feed($where) {
global $wpdb;
if(is_feed()) {
// timestamp in WP-format
$now = gmdate('Y-m-d H:i:s');
// value for wait; + device
$wait = '5'; // integer
// http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
$device = 'MINUTE'; //MINUTE, HOUR, DAY, WEEK, MONTH, YEAR
// add SQL-sytax to default $where
$where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
}
return $where;
}
add_filter('posts_where', 'publish_later_on_feed');
2015-06-19, ∼1947🔥, 0💬
Popular Posts:
How to see the key exchange process in an SFTP connection with FileZilla FTP Client? If you are conn...
Where to find answers to frequently asked questions about Fitbit devices? Here is a collection of fr...
How to remove Microsoft Teams form my Windows 7 system? I don't want it any more. You can remove Mic...
How to create a new WeChat account with my Facebook account? Creating a new WeChat account with a Fa...
I have an Apple iPad Air Model MD788C/A. Is it good? Yes. Apple iPad Air Model MD788C/A is a very go...