Function Reference: geodir_wrap_comment_text

Summary

Add rating information in comment text.

Package

GeoDirectory

Parameters

$content
(string) (required) The comment content.

Default: None
$comment
(object|string) (required) The comment object.

Default: None

Return Values

(string)
  • The comment content.

Change Log

Since: 1.0.0

1.6.16 Changes for disable review stars for certain post type.

Source File

geodir_wrap_comment_text() is located in geodirectory-functions/comments_functions.php [Line: 409]

Source Code

function geodir_wrap_comment_text($content, $comment = '') {
    if (!empty($comment->comment_post_ID) && geodir_cpt_has_rating_disabled((int)$comment->comment_post_ID)) {
        if (!is_admin()) {
            return '
' . $content . '
'; } else { return $content; } } else { $rating = 0; if (!empty($comment)) $rating = geodir_get_commentoverall($comment->comment_ID); if ($rating != 0 && !is_admin()) { return '
' . __('Overall Rating', 'geodirectory') . ':
' . $rating . '
' . geodir_get_rating_stars($rating, $comment->comment_ID) . '
' . $content . '
'; } else return $content; } }