function widget($args, $instance) { extract($args); echo $before_widget; ?> <h2 class="title"><?php echo $instance['titulo']; ?> </h2> <div class="content"> <p><?php echo $instance['intro']; ?> </p> <?php $users = tnb_get_users('', $instance['qnt_listado'], 'user_registered DESC'); ?> <?php foreach ($users as $u) { ?> <div id="artist-<?php echo $u->ID; ?> " class="ultimo-usuario"> <a href="<?php echo get_author_posts_url($u->ID); ?> " class="avatar" title="<?php _e('Ver o perfil do usuário ', 'tnb'); echo $u->display_name; ?> "> <?php echo get_avatar($u->ID, 70); ?> </a> <a href='<?php echo get_author_posts_url($u->ID); ?> ' title="<?php _e('Ver o perfil do usuário ', 'tnb'); echo $u->display_name; ?> "> <?php echo $u->display_name; ?> </a> <br/> <small><?php _e('Registrado desde ', 'tnb'); echo date('j/m/Y', strtotime($u->user_registered)); ?> </small> </div> <?php } ?> </div> <?php echo $after_widget; }
function get_produtores($limit = false, $order = false, $search = false) { return tnb_get_users('produtor', $limit, $order, $search); }