| @@ -92,8 +92,10 @@ | ||
| 92 | 92 | public function notify_new_friend_post( \WP_Post $post, User_Feed $user_feed, $keyword ) { |
| 93 | 93 | if ( |
| 94 | 94 | // Post might be trashed through rules. |
| 95 | 95 | 'trash' === $post->post_status |
| 96 | + // Don't notify about posts that WordPress scheduled for future publishing. | |
| 97 | + || 'future' === $post->post_status | |
| 96 | 98 | // Don't notify about posts older than a week. |
| 97 | 99 | || strtotime( $post->post_date_gmt ) + WEEK_IN_SECONDS < time() |
| 98 | 100 | ) { |
| 99 | 101 | return; |