Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Retrieve the user's future posts.
- *
- * @param int $user_id User ID.
- * @return array
- */
- function get_users_futures( $user_id ) {
- global $wpdb;
- $query = $wpdb->prepare("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'future' AND post_author = %d ORDER BY post_modified DESC", $user_id);
- /**
- * Filter the user's drafts query string.
- *
- * @param string $query The user's drafts query string.
- */
- $query = apply_filters( 'get_users_futures', $query );
- return $wpdb->get_results( $query );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement