AnsPress_Notification_Query::prefetch_posts()
Description #
Pre fetch post contents and append to object.
Source #
File: addons/free/notification/query.php
public function prefetch_posts() { if ( empty( $this->ids['post'] ) ) { return; } global $wpdb; $ids_str = esc_sql( sanitize_comma_delimited( $this->ids['post'] ) ); $posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} WHERE ID in ({$ids_str})" ); foreach ( (array) $posts as $_post ) { $this->append_ref_data( 'post', $_post->ID, $_post ); } }
Expand full source code Collapse full source code View on GitHub: addons/free/notification/query.php:127
Add your comment