Changeset 13582
- Timestamp:
- 04/22/2024 04:04:11 AM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-ratings-compat.php
r13580 r13582 123 123 if ( bbp_is_single_topic() && Plugin::REVIEWS_FORUM_ID == bbp_get_topic_forum_id() ) { 124 124 $user_id = bbp_get_topic_author_id(); 125 $rating =\WPORG_Ratings::get_user_rating( $this->compat, $this->slug, $user_id );125 $rating = get_post_meta( $topic_id, 'rating', true ) ?: \WPORG_Ratings::get_user_rating( $this->compat, $this->slug, $user_id ); 126 126 if ( $rating > 0 ) { 127 127 echo \WPORG_Ratings::get_dashicons_stars( $rating ); … … 175 175 if ( bbp_is_single_view() && 'reviews' == bbp_get_view_id() ) { 176 176 $user_id = bbp_get_topic_author_id( $topic_id ); 177 $rating =\WPORG_Ratings::get_user_rating( $this->compat, $this->slug, $user_id );177 $rating = get_post_meta( $topic_id, 'rating', true ) ?: \WPORG_Ratings::get_user_rating( $this->compat, $this->slug, $user_id ); 178 178 if ( $rating > 0 ) { 179 179 $title .= ' ' . \WPORG_Ratings::get_dashicons_stars( $rating ); … … 349 349 $rating 350 350 ); 351 352 // Store it against the review post for later use. 353 update_post_meta( $topic_id, 'rating', $rating ); 351 354 } 352 355 } … … 558 561 if ( Plugin::REVIEWS_FORUM_ID == bbp_get_topic_forum_id( $topic_id ) ) { 559 562 $user_id = bbp_get_topic_author_id( $topic_id ); 560 $rating =\WPORG_Ratings::get_user_rating( $this->compat, $this->slug, $user_id );563 $rating = get_post_meta( $topic_id, 'rating', true ) ?: \WPORG_Ratings::get_user_rating( $this->compat, $this->slug, $user_id ); 561 564 562 565 if ( $rating ) { … … 584 587 if ( Plugin::REVIEWS_FORUM_ID == bbp_get_topic_forum_id( $topic_id ) ) { 585 588 $user_id = bbp_get_topic_author_id( $topic_id ); 586 $rating =\WPORG_Ratings::get_user_rating( $this->compat, $this->slug, $user_id );589 $rating = get_post_meta( $topic_id, 'rating', true ) ?: \WPORG_Ratings::get_user_rating( $this->compat, $this->slug, $user_id ); 587 590 588 591 if ( $rating ) {
Note: See TracChangeset
for help on using the changeset viewer.