AnsPress_Notification_Query::prefetch_reputations()
Description #
Prefetch notification reputations.
Source #
File: addons/free/notification/query.php
public function prefetch_reputations() { global $wpdb; if ( empty( $this->ids['reputation'] ) ) { return; } $ids = esc_sql( sanitize_comma_delimited( $this->ids['reputation'] ) ); $reputations = $wpdb->get_results( "SELECT rep_id, rep_event FROM {$wpdb->ap_reputations} WHERE rep_id in ({$ids})" ); foreach ( (array) $reputations as $rep ) { $rep->points = ap_get_reputation_event_points( $rep->rep_event ); $this->append_ref_data( 'reputation', $rep->rep_id, $rep ); } }
Expand full source code Collapse full source code View on GitHub: addons/free/notification/query.php:175
Add your comment