Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cp_topPointsDisplay($count = 10, $return = 0){
- global $wpdb;
- $options = get_option('cp_topPointsWidget');
- if(!is_array($options['cp_topPointsWidget_ufilter'])){$options['cp_topPointsWidget_ufilter']=array();}
- $arr = cp_getAllPoints($count, $options['cp_topPointsWidget_ufilter']);
- $i=0;
- $uniqid=uniqid();
- foreach ($arr as $row => $data) {
- if($data['user_login']!=''){
- $id = $wpdb->get_var("SELECT `ID` FROM `".$wpdb->users."` WHERE `user_login` = '".$data['user_login']."' LIMIT 1");
- $html .= '<li><a href="'.PLUGIN_DIR.'cp_about.php?u='.$id.'&width=500&height=200" title="CubePoints - '.__('About','cp').'" class="thickbox">'.$data['user_login'].' ('.cp_formatPoints((int) $data['meta_value']).')</a></li>';
- }
- }
- $html = '<ul>'.$html.'</ul>';
- if($return==0){echo $html;}
- else { return $html; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement