Ejemplo n.º 1
0
function rcl_get_votes_window($args, $votes, $navi = false)
{
    global $wpdb, $rcl_rating_types;
    $list_votes = rcl_get_list_votes($args, $votes);
    if (isset($_POST['content']) && $_POST['content'] == 'list-votes') {
        return $list_votes;
    }
    $window = '<div class="votes-window">';
    if ($navi) {
        $window .= $navi;
    }
    $window .= '<a href="#" onclick="rcl_close_votes_window(this);return false;" class="close">' . '<i class="fa fa-times-circle"></i>' . '</a>';
    $window .= $list_votes;
    $window .= '</div>';
    return $window;
}
Ejemplo n.º 2
0
function rcl_rating_tab($author_lk)
{
    global $rcl_rating_types, $rcl_options;
    foreach ($rcl_rating_types as $type => $val) {
        if (!isset($rcl_options['rating_user_' . $type]) || !$rcl_options['rating_user_' . $type]) {
            continue;
        }
        $args = array('object_author' => $author_lk, 'rating_type' => $type);
        break;
    }
    $args['rating_status'] = 'user';
    $votes = rcl_get_rating_votes($args, array(0, 100));
    $content = rcl_rating_navi($args);
    $content .= rcl_get_list_votes($args, $votes);
    return $content;
}