. */ class BpDev_BPProfile_Widget extends WP_Widget { function __construct() { parent::__construct( false, $name = __( 'BP Profile for Blogs', 'bpdev' ) ); } function widget($args, $instance) { extract( $args ); echo $before_widget; echo $before_title . $instance['title'] . $after_title; BpDev_BPProfile_Widget::bpdev_show_blog_profile($instance);/*** show the profile fields**/ echo $after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; foreach($new_instance as $key=>$val) $instance[$key]=$val;//update the instance return $instance; } function form( $instance ) { $instance = wp_parse_args( (array) $instance, array( 'title' => __('My Profile','bpdev'), 'show_avatar' => "yes",'user_role'=>'administrator') ); $title = strip_tags( $instance['title'] ); extract($instance,EXTR_SKIP); ?>
| >Show >Hide |
| ".bp_core_get_userlink($user_id) ." | ".bp_core_fetch_avatar(array("item_id"=>$user_id,"type"=>"thumb"))." |
| ".bp_get_the_profile_field_name()." | ".bp_get_profile_field_data(array('field'=>bp_get_the_profile_field_id(),'user_id'=>$user_id))." |