0, 4 => 0, 3 => 0, 2 => 0, 1 => 0, ]; $average_stats = []; if ( $features ) { foreach ( $features as $feature_slug => $feature_title ) { $average_stats[ $feature_slug ] = '0.00'; } } $count = $object->get_rating_counts(); $counts = $object->get_rating_count_stats() ? $object->get_rating_count_stats() : $counts; $average = $object->get_average_rating(); $average_stats = $object->get_rating_average_stats() ? $object->get_rating_average_stats() : $average_stats; ?>

$value ) : ?> get_rating_counts() ) * 100 ); ?>
%
%

get_average_rating() ? $object->get_average_rating() : '0.00' ); ?>

$average_stars ) : ?> $feature_slug, 'post_type' => $cpt_feature, 'post_status' => 'publish', 'numberposts' => 1, ]; $feature = get_posts( $args ); if ( ! $feature || ! isset( $feature[0] ) ) { continue; } ?>
%
get_review_count() ), 'review numbers', 'opalestate-pro' ), number_format_i18n( absint( $object->get_review_count() ) ) ); ?>
    'opalestate_comments' ] ) ); ?>
1 && get_option( 'page_comments' ) ) : echo ''; endif; ?>

post_author ) ) : ?> $current_user_id, 'post_id' => $object->get_id(), 'status' => 'approve', 'count' => true, ] ); ?>
have_comments() ? esc_html__( 'Add a review', 'opalestate-pro' ) : sprintf( esc_html__( 'Be the first to review “%s”', 'opalestate-pro' ), get_the_title() ), /* translators: %s is property title */ 'title_reply_to' => esc_html__( 'Leave a Reply to %s', 'opalestate-pro' ), 'title_reply_before' => '
', 'title_reply_after' => '
', 'comment_notes_after' => '', 'fields' => [ 'author' => '

' . '

', 'email' => '', ], 'label_submit' => esc_html__( 'Submit', 'opalestate-pro' ), 'logged_in_as' => '', 'comment_field' => '', ]; if ( $features ) { $feature_inputs = ''; foreach ( $features as $feature_slug => $feature_title ) { $feature_inputs .= '
'; } $comment_form['comment_field'] = $feature_inputs; } else { $comment_form['comment_field'] = '
'; } $comment_form['comment_field'] .= '

'; comment_form( apply_filters( 'opalestate_property_review_comment_form_args', $comment_form ) ); ?>