/**
 * Modify rating fields when rating disabled.
 *
 * @since 1.0.0
 * @package GeoDirectory
 * @global object $post The current post object.
 */
function geodir_no_rating_rating_fields()
{
    global $post;
    $post_types = geodir_get_posttypes();
    if (!empty($post) && isset($post->post_type) && in_array($post->post_type, $post_types)) {
        if (is_plugin_active('geodir_review_rating_manager/geodir_review_rating_manager.php')) {
            echo '<input type="hidden" value="1" name="geodir_rating[overall]" />';
            if (get_option('geodir_reviewrating_enable_images')) {
                geodir_reviewrating_rating_img_html();
            }
        } else {
            echo '<input type="hidden" id="geodir_overallrating" name="geodir_overallrating" value="1" />';
        }
    }
}
/**
 * Adds multi rating and image upload fields to comments.
 *
 * @since 1.0.0
 * @package GeoDirectory_Review_Rating_Manager
 *
 * @return bool
 */
function geodir_reviewrating_comment_rating_fields()
{
    global $geodir_post_type;
    $all_postypes = geodir_get_posttypes();
    if (!in_array($geodir_post_type, $all_postypes)) {
        return false;
    }
    if (get_option('geodir_reviewrating_enable_rating')) {
        geodir_reviewrating_rating_frm_html();
    }
    if (get_option('geodir_reviewrating_enable_images')) {
        geodir_reviewrating_rating_img_html();
    }
}