dozent_get_review( int $review_id )
Get single review result from database by review ID
Description
See also
Parameters
- $review_id
-
(int) (Required)
Return
(bool|mixed|void)
Source
File: includes/core-functions.php
function dozent_get_review( $review_id = 0 ) { global $wpdb; if ( ! $review_id ) { return false; } $query = $wpdb->get_row( " SELECT reviews.* , review_author.display_name as user_display_name, course.post_title as course_title FROM {$wpdb->dozent_reviews} reviews LEFT JOIN {$wpdb->users} review_author ON reviews.user_id = review_author.ID LEFT JOIN {$wpdb->posts} course ON reviews.course_id = course.ID WHERE reviews.ID = {$review_id} ;" ); /** * Filter review result * * @param object|null $query Reivew query result * @param int $review_id */ return apply_filters( 'dozent_get_review', $query, $review_id ); }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |