function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); if (is_user_logged_in()) { echo $before_widget; if ($title) { echo $before_title . esc_attr($title) . $after_title; } ?> <div class="widget_profile"> <?php $out = ''; $user_login = get_userdata(get_current_user_id()); $active_points = vpanel_options("active_points"); $out .= ' <ul class="user_quick_links"> <li><a href="' . vpanel_get_user_url($user_login->ID) . '"><i class="icon-home"></i>' . __("Profile page", "vbegy") . '</a></li> <li><a href="' . esc_url(add_query_arg("u", esc_attr($user_login->ID), get_page_link(vpanel_options('question_user_page')))) . '"><i class="icon-question-sign"></i>' . __("Questions", "vbegy") . '</a></li> <li><a href="' . esc_url(add_query_arg("u", esc_attr($user_login->ID), get_page_link(vpanel_options('answer_user_page')))) . '"><i class="icon-comment"></i>' . __("Answers", "vbegy") . '</a></li> <li><a href="' . esc_url(add_query_arg("u", esc_attr($user_login->ID), get_page_link(vpanel_options('favorite_user_page')))) . '"><i class="icon-star"></i>' . __("Favorite Questions", "vbegy") . '</a></li> <li><a href="' . esc_url(add_query_arg("u", esc_attr($user_login->ID), get_page_link(vpanel_options('i_follow_user_page')))) . '"><i class="icon-user-md"></i>' . __("Authors I Follow", "vbegy") . '</a></li> <li><a href="' . esc_url(add_query_arg("u", esc_attr($user_login->ID), get_page_link(vpanel_options('followers_user_page')))) . '"><i class="icon-user"></i>' . __("Followers", "vbegy") . '</a></li>'; if ($active_points == 1) { $out .= '<li><a href="' . esc_url(add_query_arg("u", esc_attr($user_login->ID), get_page_link(vpanel_options('point_user_page')))) . '"><i class="icon-heart"></i>' . __("Points", "vbegy") . '</a></li>'; } $out .= '<li><a href="' . esc_url(add_query_arg("u", esc_attr($user_login->ID), get_page_link(vpanel_options('follow_question_page')))) . '"><i class="icon-question-sign"></i>' . __("Follow questions", "vbegy") . '</a></li> <li><a href="' . esc_url(add_query_arg("u", esc_attr($user_login->ID), get_page_link(vpanel_options('follow_answer_page')))) . '"><i class="icon-comment"></i>' . __("Follow answers", "vbegy") . '</a></li> <li><a href="' . esc_url(add_query_arg("u", esc_attr($user_login->ID), get_page_link(vpanel_options('post_user_page')))) . '"><i class="icon-file-alt"></i>' . __("Posts", "vbegy") . '</a></li> <li><a href="' . esc_url(add_query_arg("u", esc_attr($user_login->ID), get_page_link(vpanel_options('follow_post_page')))) . '"><i class="icon-file-alt"></i>' . __("Follow posts", "vbegy") . '</a></li> <li><a href="' . esc_url(add_query_arg("u", esc_attr($user_login->ID), get_page_link(vpanel_options('follow_comment_page')))) . '"><i class="icon-comments"></i>' . __("Follow comments", "vbegy") . '</a></li> <li><a href="' . get_page_link(vpanel_options('user_edit_profile_page')) . '"><i class="icon-pencil"></i>' . __("Edit profile", "vbegy") . '</a></li> <li><a href="' . wp_logout_url(home_url()) . '"><i class="icon-signout"></i>' . __("Logout", "vbegy") . '</a></li> </ul>'; ?> </div> <?php echo $out; echo $after_widget; } }
} else { echo get_avatar($comment, 60); } } else { echo get_avatar($comment->comment_author_email, 60); } ?> </div> <div class="comment-text"> <div class="author clearfix"> <div class="comment-author"> <?php if ($comment->user_id != 0) { ?> <a href="<?php echo vpanel_get_user_url($user_login_id_l->ID); ?> "> <?php } echo get_comment_author(); if ($comment->user_id != 0) { ?> </a> <?php } ?> </div> <?php $active_vote = vpanel_options("active_vote"); if ($active_vote == 1) {
function vbegy_answer($comment, $args, $depth) { global $post; $GLOBALS['comment'] = $comment; $add_below = ''; $comment_vote = get_comment_meta($comment->comment_ID, 'comment_vote'); $comment_vote = !empty($comment_vote) ? $comment_vote[0]["vote"] : ""; $the_best_answer = get_post_meta($post->ID, "the_best_answer", true); $comment_best_answer = $the_best_answer == $comment->comment_ID ? "comment-best-answer" : ""; $active_reports = vpanel_options("active_reports"); $active_vote = vpanel_options("active_vote"); $GLOBALS['comment'] = $comment; ?> <li <?php comment_class('comment ' . $comment_best_answer); ?> id="li-comment-<?php comment_ID(); ?> "> <div id="comment-<?php comment_ID(); ?> " class="comment-body clearfix" rel="post-<?php echo $post->ID; ?> "> <div class="avatar-img"> <?php if ($comment->user_id != 0) { $vpanel_get_user_url = vpanel_get_user_url($comment->user_id, get_the_author_meta('user_nicename', $comment->user_id)); if (get_the_author_meta('you_avatar', $comment->user_id)) { $you_avatar_img = get_aq_resize_url(esc_attr(get_the_author_meta('you_avatar', $comment->user_id)), "full", 65, 65); echo "<img alt='" . $comment->comment_author . "' src='" . $you_avatar_img . "'>"; } else { echo get_avatar($comment, 65); } } else { $vpanel_get_user_url = $comment->comment_author_url != "" ? $comment->comment_author_url : "vpanel_No_site"; echo get_avatar($comment->comment_author_email, 65); } ?> </div> <div class="comment-text"> <div class="author clearfix"> <div class="comment-author"> <?php if ($vpanel_get_user_url != "" && $vpanel_get_user_url != "vpanel_No_site") { ?> <a href="<?php echo esc_url($vpanel_get_user_url); ?> "> <?php } echo get_comment_author(); if ($vpanel_get_user_url != "" && $vpanel_get_user_url != "vpanel_No_site") { ?> </a> <?php } ?> </div> <?php if ($active_vote == 1) { ?> <div class="comment-vote"> <ul class="single-question-vote"> <?php if (is_user_logged_in()) { ?> <li class="loader_3"></li> <li><a href="#" class="single-question-vote-up comment_vote_up<?php echo isset($_COOKIE['comment_vote' . $comment->comment_ID]) ? " " . $_COOKIE['comment_vote' . $comment->comment_ID] . "-" . $comment->comment_ID : ""; ?> " title="<?php _e("Like", "vbegy"); ?> " id="comment_vote_up-<?php echo $comment->comment_ID; ?> "><i class="icon-thumbs-up"></i></a></li> <li><a href="#" class="single-question-vote-down comment_vote_down<?php echo isset($_COOKIE['comment_vote' . $comment->comment_ID]) ? " " . $_COOKIE['comment_vote' . $comment->comment_ID] . "-" . $comment->comment_ID : ""; ?> " id="comment_vote_down-<?php echo $comment->comment_ID; ?> " title="<?php _e("Dislike", "vbegy"); ?> "><i class="icon-thumbs-down"></i></a></li> <?php } else { ?> <li class="loader_3"></li> <li><a href="#" class="single-question-vote-up comment_vote_up vote_not_user" title="<?php _e("Like", "vbegy"); ?> "><i class="icon-thumbs-up"></i></a></li> <li><a href="#" class="single-question-vote-down comment_vote_down vote_not_user" title="<?php _e("Dislike", "vbegy"); ?> "><i class="icon-thumbs-down"></i></a></li> <?php } ?> </ul> </div> <span class="question-vote-result question_vote_result <?php echo $comment_vote < 0 ? "question_vote_red" : ""; ?> "><?php echo $comment_vote != "" ? $comment_vote : 0; ?> </span> <?php } ?> <div class="comment-meta"> <div class="date"><i class="icon-time"></i><?php printf(__('%1$s at %2$s', 'vbegy'), get_comment_date(), get_comment_time()); ?> </div> </div> <div class="comment-reply"> <?php edit_comment_link(__("Edit", "vbegy"), ' ', ''); if ($active_reports == 1) { ?> <a class="question_r_l comment_l report_c" href="#"><i class="icon-flag"></i><?php _e("Report", "vbegy"); ?> </a> <?php } comment_reply_link(array_merge($args, array('reply_text' => '<i class="icon-reply"></i>' . __('Reply', 'vbegy'), 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?> </div> </div> <div class="text"> <?php if ($active_reports == 1) { ?> <div class="explain-reported"> <h3><?php _e("Please briefly explain why you feel this answer should be reported .", "vbegy"); ?> </h3> <textarea name="explain-reported"></textarea> <div class="clearfix"></div> <div class="loader_3"></div> <a class="color button small report"><?php _e("Report", "vbegy"); ?> </a> <a class="color button small dark_button cancel"><?php _e("Cancel", "vbegy"); ?> </a> </div><!-- End reported --> <?php } if ($comment->comment_approved == '0') { ?> <em><?php _e('Your comment is awaiting moderation.', 'vbegy'); ?> </em><br> <?php } echo nl2br(makeClickableLinks($comment->comment_content)); ?> <div class="clearfix"></div> <?php $added_file = get_comment_meta($comment->comment_ID, 'added_file', true); if ($added_file != "") { echo "<div class='clearfix'></div><br><a href='" . wp_get_attachment_url($added_file) . "'>" . __("Attachment", "vbegy") . "</a>"; } ?> </div> <div class="clearfix"></div> <div class="loader_3"></div> <?php $admin_best_answer = vpanel_options("admin_best_answer"); if ($the_best_answer == $comment->comment_ID) { echo '<div class="commentform question-answered question-answered-done"><i class="icon-ok"></i>' . __("Best answer", "vbegy") . '</div> <div class="clearfix"></div>'; if ((is_user_logged_in() && get_current_user_id() == $post->post_author || $admin_best_answer == 1 && is_super_admin(get_current_user_id())) && $the_best_answer != 0) { echo '<a class="commentform best_answer_re question-report" title="' . __("Cancel the best answer", "vbegy") . '" href="#">' . __("Cancel the best answer", "vbegy") . '</a>'; } } if ((is_user_logged_in() && get_current_user_id() == $post->post_author || $admin_best_answer == 1 && is_super_admin(get_current_user_id())) && ($the_best_answer == 0 or $the_best_answer == "")) { ?> <a class="commentform best_answer_a question-report" title="<?php _e("Select as best answer", "vbegy"); ?> " href="#"><?php _e("Select as best answer", "vbegy"); ?> </a> <?php } ?> <div class="no_vote_more"></div> </div> </div> <?php }
<div class="comment-body clearfix"> <div class="avatar-img"> <?php if (get_the_author_meta('you_avatar', $comment->user_id)) { $you_avatar_img = get_aq_resize_url(esc_attr(get_the_author_meta('you_avatar', $comment->user_id)), "full", 65, 65); echo "<img alt='" . $comment->comment_author . "' src='" . $you_avatar_img . "'>"; } else { echo get_avatar($comment, 65); } ?> </div> <div class="comment-text"> <div class="author clearfix"> <div class="comment-meta"> <div class="comment-author"><a href="<?php echo vpanel_get_user_url($comment->user_id, get_the_author_meta('user_nicename', $comment->user_id)); ?> "><?php echo get_comment_author(); ?> </a></div> <div class="date"><i class="icon-time"></i><?php printf(__('%1$s at %2$s', 'vbegy'), get_comment_date(), get_comment_time()); ?> </div> </div> </div> <div class="text"> <?php if ($comment->comment_approved == '0') { ?>
function is_user_logged_in_data($user_links) { $out = ''; if (is_user_logged_in()) { $user_login = get_userdata(get_current_user_id()); $you_avatar = get_the_author_meta('you_avatar', $user_login->ID); $url = get_the_author_meta('url', $user_login->ID); $twitter = get_the_author_meta('twitter', $user_login->ID); $facebook = get_the_author_meta('facebook', $user_login->ID); $youtube = get_the_author_meta('youtube', $user_login->ID); $google = get_the_author_meta('google', $user_login->ID); $linkedin = get_the_author_meta('linkedin', $user_login->ID); $follow_email = get_the_author_meta('follow_email', $user_login->ID); $country = get_the_author_meta('country', $user_login->ID); $city = get_the_author_meta('city', $user_login->ID); $phone = get_the_author_meta('phone', $user_login->ID); $age = get_the_author_meta('age', $user_login->ID); $sex = get_the_author_meta('sex', $user_login->ID); $out .= '<div class="row"> <div class="col-md-8"> <div class="is-login-left user-profile-img"> <a original-title="' . $user_login->display_name . '" class="tooltip-n" href="' . vpanel_get_user_url($user_login->ID) . '">'; if ($you_avatar) { $you_avatar_img = get_aq_resize_url(esc_attr($you_avatar), "full", 79, 79); $out .= "<img alt='" . $user_login->display_name . "' src='" . $you_avatar_img . "'>"; } else { $out .= get_avatar(get_the_author_meta('user_email', $user_login->ID), '65', ''); } $out .= '</a> </div> <div class="is-login-right"> <h2>' . __("Welcome", "vbegy") . ' ' . $user_login->display_name . '</h2> <p>' . $user_login->description . '</p>'; if ($youtube || $facebook || $twitter || $linkedin || $google || $follow_email) { if ($facebook) { $out .= '<a href="' . $facebook . '" original-title="' . __("Facebook", "vbegy") . '" class="tooltip-n"> <span class="icon_i"> <span class="icon_square" icon_size="30" span_bg="#3b5997"> <i class="social_icon-facebook"></i> </span> </span> </a>'; } if ($twitter) { $out .= '<a href="' . $twitter . '" original-title="' . __("Twitter", "vbegy") . '" class="tooltip-n"> <span class="icon_i"> <span class="icon_square" icon_size="30" span_bg="#00baf0"> <i class="social_icon-twitter"></i> </span> </span> </a>'; } if ($youtube) { $out .= '<a href="' . $youtube . '" original-title="' . __("Youtube", "vbegy") . '" class="tooltip-n"> <span class="icon_i"> <span class="icon_square" icon_size="30" span_bg="#c4302b"> <i class="social_icon-youtube"></i> </span> </span> </a>'; } if ($linkedin) { $out .= '<a href="' . $linkedin . '" original-title="' . __("Linkedin", "vbegy") . '" class="tooltip-n"> <span class="icon_i"> <span class="icon_square" icon_size="30" span_bg="#006599"> <i class="social_icon-linkedin"></i> </span> </span> </a>'; } if ($google) { $out .= '<a href="' . $google . '" original-title="' . __("Google plus", "vbegy") . '" class="tooltip-n"> <span class="icon_i"> <span class="icon_square" icon_size="30" span_bg="#c43c2c"> <i class="social_icon-gplus"></i> </span> </span> </a>'; } if ($follow_email) { $out .= '<a href="mailto:' . $follow_email . '" original-title="' . __("Email", "vbegy") . '" class="tooltip-n"> <span class="icon_i"> <span class="icon_square" icon_size="30" span_bg="#000"> <i class="social_icon-email"></i> </span> </span> </a>'; } } $get_lang = esc_attr(get_query_var("lang")); $get_lang_array = array(); if (isset($get_lang) && $get_lang != "") { $get_lang_array = array("lang" => $get_lang); } $out .= '</div> </div> <div class="col-md-4">'; $active_points = vpanel_options("active_points"); if (isset($user_links) && is_array($user_links) && (isset($user_links["profile"]) && ($user_links["profile"] == 1 || $user_links["profile"] == "on") || isset($user_links["questions"]) && ($user_links["questions"] == 1 || $user_links["questions"] == "on") || isset($user_links["answers"]) && ($user_links["answers"] == 1 || $user_links["answers"] == "on") || isset($user_links["favorite"]) && ($user_links["favorite"] == 1 || $user_links["favorite"] == "on") || isset($user_links["points"]) && ($user_links["points"] == 1 || $user_links["points"] == "on") || isset($user_links["i_follow"]) && ($user_links["i_follow"] == 1 || $user_links["i_follow"] == "on") || isset($user_links["followers"]) && ($user_links["followers"] == 1 || $user_links["followers"] == "on") || isset($user_links["posts"]) && ($user_links["posts"] == 1 || $user_links["posts"] == "on") || isset($user_links["follow_questions"]) && ($user_links["follow_questions"] == 1 || $user_links["follow_questions"] == "on") || isset($user_links["follow_answers"]) && ($user_links["follow_answers"] == 1 || $user_links["follow_answers"] == "on") || isset($user_links["follow_posts"]) && ($user_links["follow_posts"] == 1 || $user_links["follow_posts"] == "on") || isset($user_links["follow_comments"]) && ($user_links["follow_comments"] == 1 || $user_links["follow_comments"] == "on") || isset($user_links["edit_profile"]) && ($user_links["edit_profile"] == 1 || $user_links["edit_profile"] == "on") || isset($user_links["logout"]) && ($user_links["logout"] == 1 || $user_links["logout"] == "on"))) { $out .= '<h2>' . __("Quick Links", "vbegy") . '</h2> <div class="row">'; if (isset($user_links) && is_array($user_links) && (isset($user_links["profile"]) && ($user_links["profile"] == 1 || $user_links["profile"] == "on") || isset($user_links["questions"]) && ($user_links["questions"] == 1 || $user_links["questions"] == "on") || isset($user_links["answers"]) && ($user_links["answers"] == 1 || $user_links["answers"] == "on") || isset($user_links["favorite"]) && ($user_links["favorite"] == 1 || $user_links["favorite"] == "on") || isset($user_links["points"]) && ($user_links["points"] == 1 || $user_links["points"] == "on") || isset($user_links["i_follow"]) && ($user_links["i_follow"] == 1 || $user_links["i_follow"] == "on") || isset($user_links["followers"]) && ($user_links["followers"] == 1 || $user_links["followers"] == "on"))) { $out .= '<div class="col-md-6"> <ul class="user_quick_links">'; if (isset($user_links) && is_array($user_links) && (isset($user_links["profile"]) && ($user_links["profile"] == 1 || $user_links["profile"] == "on"))) { $out .= '<li><a href="' . vpanel_get_user_url($user_login->ID) . '"><i class="icon-home"></i>' . __("Profile page", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["questions"]) && ($user_links["questions"] == 1 || $user_links["questions"] == "on"))) { $out .= '<li><a href="' . esc_url(add_query_arg(array_merge(array("u" => esc_attr($user_login->ID), $get_lang_array)), get_page_link(vpanel_options('question_user_page')))) . '"><i class="icon-question-sign"></i>' . __("Questions", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["answers"]) && ($user_links["answers"] == 1 || $user_links["answers"] == "on"))) { $out .= '<li><a href="' . esc_url(add_query_arg(array_merge(array("u" => esc_attr($user_login->ID), $get_lang_array)), get_page_link(vpanel_options('answer_user_page')))) . '"><i class="icon-comment"></i>' . __("Answers", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["favorite"]) && ($user_links["favorite"] == 1 || $user_links["favorite"] == "on"))) { $out .= '<li><a href="' . esc_url(add_query_arg(array_merge(array("u" => esc_attr($user_login->ID), $get_lang_array)), get_page_link(vpanel_options('favorite_user_page')))) . '"><i class="icon-star"></i>' . __("Favorite Questions", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["points"]) && ($user_links["points"] == 1 || $user_links["points"] == "on")) && $active_points == 1) { $out .= '<li><a href="' . esc_url(add_query_arg(array_merge(array("u" => esc_attr($user_login->ID), $get_lang_array)), get_page_link(vpanel_options('point_user_page')))) . '"><i class="icon-heart"></i>' . __("Points", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["i_follow"]) && ($user_links["i_follow"] == 1 || $user_links["i_follow"] == "on")) && $active_points == 1) { $out .= '<li><a href="' . esc_url(add_query_arg(array_merge(array("u" => esc_attr($user_login->ID), $get_lang_array)), get_page_link(vpanel_options('i_follow_user_page')))) . '"><i class="icon-user-md"></i>' . __("Authors I Follow", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["followers"]) && ($user_links["followers"] == 1 || $user_links["followers"] == "on"))) { $out .= '<li><a href="' . esc_url(add_query_arg(array_merge(array("u" => esc_attr($user_login->ID), $get_lang_array)), get_page_link(vpanel_options('followers_user_page')))) . '"><i class="icon-user"></i>' . __("Followers", "vbegy") . '</a></li>'; } $out .= '</ul> </div>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["posts"]) && ($user_links["posts"] == 1 || $user_links["posts"] == "on") || isset($user_links["follow_questions"]) && ($user_links["follow_questions"] == 1 || $user_links["follow_questions"] == "on") || isset($user_links["follow_answers"]) && ($user_links["follow_answers"] == 1 || $user_links["follow_answers"] == "on") || isset($user_links["follow_posts"]) && ($user_links["follow_posts"] == 1 || $user_links["follow_posts"] == "on") || isset($user_links["follow_comments"]) && ($user_links["follow_comments"] == 1 || $user_links["follow_comments"] == "on") || isset($user_links["edit_profile"]) && ($user_links["edit_profile"] == 1 || $user_links["edit_profile"] == "on") || isset($user_links["logout"]) && ($user_links["logout"] == 1 || $user_links["logout"] == "on"))) { $out .= '<div class="col-md-6"> <ul class="user_quick_links">'; if (isset($user_links) && is_array($user_links) && (isset($user_links["posts"]) && ($user_links["posts"] == 1 || $user_links["posts"] == "on"))) { $out .= '<li><a href="' . esc_url(add_query_arg(array_merge(array("u" => esc_attr($user_login->ID), $get_lang_array)), get_page_link(vpanel_options('post_user_page')))) . '"><i class="icon-file-alt"></i>' . __("Posts", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["follow_questions"]) && ($user_links["follow_questions"] == 1 || $user_links["follow_questions"] == "on"))) { $out .= '<li><a href="' . esc_url(add_query_arg(array_merge(array("u" => esc_attr($user_login->ID), $get_lang_array)), get_page_link(vpanel_options('follow_question_page')))) . '"><i class="icon-question-sign"></i>' . __("Follow questions", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["follow_answers"]) && ($user_links["follow_answers"] == 1 || $user_links["follow_answers"] == "on"))) { $out .= '<li><a href="' . esc_url(add_query_arg(array_merge(array("u" => esc_attr($user_login->ID), $get_lang_array)), get_page_link(vpanel_options('follow_answer_page')))) . '"><i class="icon-comment"></i>' . __("Follow answers", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["follow_posts"]) && ($user_links["follow_posts"] == 1 || $user_links["follow_posts"] == "on"))) { $out .= '<li><a href="' . esc_url(add_query_arg(array_merge(array("u" => esc_attr($user_login->ID), $get_lang_array)), get_page_link(vpanel_options('follow_post_page')))) . '"><i class="icon-file-alt"></i>' . __("Follow posts", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["follow_comments"]) && ($user_links["follow_comments"] == 1 || $user_links["follow_comments"] == "on"))) { $out .= '<li><a href="' . esc_url(add_query_arg(array_merge(array("u" => esc_attr($user_login->ID), $get_lang_array)), get_page_link(vpanel_options('follow_comment_page')))) . '"><i class="icon-comments"></i>' . __("Follow comments", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["edit_profile"]) && ($user_links["edit_profile"] == 1 || $user_links["edit_profile"] == "on"))) { $out .= '<li><a href="' . esc_url(add_query_arg(array("u" => esc_attr($user_login->ID), $get_lang_array), get_page_link(vpanel_options('user_edit_profile_page')))) . '"><i class="icon-pencil"></i>' . __("Edit profile", "vbegy") . '</a></li>'; } if (isset($user_links) && is_array($user_links) && (isset($user_links["logout"]) && ($user_links["logout"] == 1 || $user_links["logout"] == "on"))) { $out .= '<li><a href="' . wp_logout_url(home_url()) . '"><i class="icon-signout"></i>' . __("Logout", "vbegy") . '</a></li>'; } $out .= '</ul> </div>'; } $out .= '</div>'; } $out .= '</div><!-- End col-md-4 --> </div><!-- End row -->'; } else { $out .= '<div class="form-style form-style-3"> ' . do_shortcode("[ask_login]") . ' </div>'; } return $out; }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $user_per_page = (int) $instance['user_per_page']; $active_points = vpanel_options("active_points"); if ($active_points == 1) { echo $before_widget; if ($title) { echo $before_title . esc_attr($title) . $after_title; } ?> <div class="widget_highest_points"> <ul> <?php $blogusers = get_users(array('fields' => 'all_with_meta', 'order' => 'DESC', 'meta_query' => array(array('key' => 'points', 'value' => 1, 'compare' => '>=', 'type' => 'number')))); usort($blogusers, 'cmp'); $i = 0; foreach ($blogusers as $user) { $i++; $points_u = get_user_meta($user->ID, "points", true); $user_profile_page = vpanel_get_user_url($user->ID); $you_avatar = get_the_author_meta('you_avatar', $user->ID); ?> <li> <div class="author-img"> <a href="<?php echo $user_profile_page; ?> "> <?php if ($you_avatar) { $you_avatar_img = get_aq_resize_url(esc_attr($you_avatar), "full", 65, 65); echo "<img alt='" . $user->display_name . "' src='" . $you_avatar_img . "'>"; } else { echo get_avatar(get_the_author_meta('user_email', $user->ID), '60', ''); } ?> </a> </div> <h6><a href="<?php echo $user_profile_page; ?> "><?php echo $user->display_name; ?> </a></h6> <span class="comment"><?php echo $points_u != "" ? $points_u : "0"; ?> <?php _e("Points", "vbegy"); ?> </span> <div class="clearfix"></div> </li> <?php if ($i == $user_per_page) { break; } } ?> </ul> </div> <?php echo $after_widget; } }
echo '</a>'; } } echo '</div><!-- End advertising --> <div class="clearfix"></div>'; } } else { if ($value_r == "author") { $post_author_box = vpanel_options("post_author_box"); if ($post_author_box == 1 && $post_author_box_s == "" || $post_author_box == 1 && isset($custom_page_setting) && $custom_page_setting == 0 || $post_author_box == 1 && isset($custom_page_setting) && $custom_page_setting == 1 && isset($post_author_box_s) && $post_author_box_s != 0 || isset($custom_page_setting) && $custom_page_setting == 1 && isset($post_author_box_s) && $post_author_box_s == 1) { if ($post->post_author != 0) { ?> <div class="about-author clearfix"> <div class="author-image"> <a href="<?php echo vpanel_get_user_url($authordata->ID, $authordata->user_nicename); ?> " original-title="<?php the_author(); ?> " class="tooltip-n"> <?php if (get_the_author_meta('you_avatar', get_the_author_meta('ID'))) { $you_avatar_img = get_aq_resize_url(esc_attr(get_the_author_meta('you_avatar', get_the_author_meta('ID'))), "full", 65, 65); echo "<img alt='" . $authordata->display_name . "' src='" . $you_avatar_img . "'>"; } else { echo get_avatar(get_the_author_meta('user_email', $authordata->ID), '65', ''); } ?> </a> </div>
<h2><?php _e("About", "vbegy"); ?> <a href="<?php echo vpanel_get_user_url($user_login->ID); ?> "><?php echo $user_login->display_name; ?> </a></h2> <div class="user-profile-img"> <a original-title="<?php echo $user_login->display_name; ?> " class="tooltip-n" href="<?php echo vpanel_get_user_url($user_login->ID); ?> "> <?php if ($you_avatar) { $you_avatar_img = get_aq_resize_url(esc_attr($you_avatar), "full", 65, 65); echo "<img alt='" . $user_login->display_name . "' src='" . $you_avatar_img . "'>"; } else { echo get_avatar(get_the_author_meta('user_email', $user_login->ID), '65', ''); } ?> </a> </div> <div class="ul_list ul_list-icon-ok about-user"> <?php $user_registered = vpanel_options("user_registered");
echo $user->display_name; ?> " class="tooltip-n"> <?php if ($you_avatar) { $you_avatar_img = get_aq_resize_url(esc_attr(get_the_author_meta('you_avatar', $user->ID)), "full", 65, 65); echo "<img alt='" . $user->display_name . "' src='" . $you_avatar_img . "'>"; } else { echo get_avatar(get_the_author_meta('user_email', $user->ID), '65', ''); } ?> </a> </div> <div class="author-bio"> <h4><a href="<?php echo vpanel_get_user_url($user->ID); ?> "><?php echo $user->display_name; ?> </a></h4> <?php echo $user->description; ?> <div class="clearfix"></div> <br> <?php if ($facebook || $twitter || $linkedin || $google || $follow_email || $youtube || $pinterest || $instagram) { ?> <span class="user-follow-me"><?php _e("Follow Me", "vbegy");
<?php } else { ?> <div class="question-type-main"><i class="icon-question-sign"></i><?php _e("Question", "vbegy"); ?> </div> <?php } ?> <div class="question-author"> <?php if ($post->post_author != 0) { ?> <a href="<?php echo vpanel_get_user_url($authordata->ID); ?> " original-title="<?php the_author(); ?> " class="question-author-img tooltip-n"> <?php } else { ?> <div class="question-author-img"> <?php } ?> <span></span> <?php if (get_the_author_meta('you_avatar', get_the_author_meta('ID'))) {
function r_answers() { ?> <div class="reports-warp"> <div class="reports-head"><i class="dashicons dashicons-flag"></i>Answers Reports</div> <div class="reports-padding"> <div class="reports-table"> <div class="reports-table-head"> <div class="report-link">Link</div> <div class="report-author">Author</div> <div class="report-date">Date</div> <div class="reports-options">Options</div> </div><!-- End reports-table-head --> <?php $rows_per_page = get_option("posts_per_page"); $ask_option_answer = get_option("ask_option_answer"); $ask_option_answer_array = get_option("ask_option_answer_array"); if (is_array($ask_option_answer_array)) { foreach ($ask_option_answer_array as $key => $value) { $ask_one_option[$value] = get_option("ask_option_answer_" . $value); } } if (isset($ask_one_option) and is_array($ask_one_option)) { ?> <div class="reports-table-items"> <?php $ask_reports_option = array_reverse($ask_one_option); $paged = isset($_GET["paged"]) ? (int) $_GET["paged"] : 1; $current = max(1, $paged); $pagination_args = array('base' => @esc_url(add_query_arg('paged', '%#%')), 'total' => ceil(sizeof($ask_reports_option) / $rows_per_page), 'current' => $current, 'show_all' => true, 'prev_text' => '« Previous', 'next_text' => 'Next »'); if (!empty($wp_query->query_vars['s'])) { $pagination_args['add_args'] = array('s' => get_query_var('s')); } $start = ($current - 1) * $rows_per_page; $end = $start + $rows_per_page; $end = sizeof($ask_reports_option) < $end ? sizeof($ask_reports_option) : $end; for ($i = $start; $i < $end; ++$i) { $ask_reports_option_result = $ask_reports_option[$i]; ?> <div class="reports-table-item"> <div class="report-link"><a href="<?php echo get_the_permalink($ask_reports_option_result["post_id"]); ?> #comment-<?php echo $ask_reports_option_result["comment_id"]; ?> "><?php echo get_the_permalink($ask_reports_option_result["post_id"]); ?> #comment-<?php echo $ask_reports_option_result["comment_id"]; ?> </a></div> <div class="report-author"> <?php if ($ask_reports_option_result["the_author"] != "") { if ($ask_reports_option_result["the_author"] == 1) { echo "Not user"; } else { echo $ask_reports_option_result["the_author"]; } } else { ?> <a href="<?php echo vpanel_get_user_url((int) $ask_reports_option_result["user_id"]); ?> "><?php echo get_the_author_meta("display_name", (int) $ask_reports_option_result["user_id"]); ?> </a><?php } ?> </div> <div class="report-date"><?php echo human_time_diff($ask_reports_option_result["the_date"], current_time('timestamp')) . " ago"; ?> </div> <div class="reports-options"> <a href="#" class="reports-view reports-answers dashicons dashicons-search" attr="<?php echo $ask_reports_option_result["item_id_option"]; ?> "></a> <a href="#" attr="<?php echo $ask_reports_option_result["item_id_option"]; ?> " class="reports-delete reports-answers dashicons dashicons-no"></a> <?php if ($ask_reports_option_result["report_new"] == 1) { ?> <div title="New reports" class="reports-new dashicons dashicons-email-alt"></div> <?php } ?> </div> <div id="reports-<?php echo $ask_reports_option_result["item_id_option"]; ?> " class="reports-pop"> <div class="reports-pop-no-scroll"> <div class="reports-pop-inner"> <a href="#" class="reports-close dashicons dashicons-no"></a> <div class="clear"></div> <div class="reports-pop-warp"> <div> <div>Message</div> <div><?php echo nl2br($ask_reports_option_result["value"]); ?> </div> </div> </div> <div class="clear"></div> </div> </div> </div> </div> <?php } ?> </div><!-- End reports-table-items --> <?php } else { echo "<p>There are no reports yet</p>"; } ?> </div><!-- End reports-table --> <?php if (isset($pagination_args["total"]) && $pagination_args["total"] > 1) { ?> <div class='reports-paged'> <?php echo paginate_links($pagination_args) != "" ? paginate_links($pagination_args) : ""; ?> </div><!-- End reports-paged --> <div class="clear"></div> <?php } ?> </div><!-- End reports-padding --> </div><!-- End reports-warp --> <?php }