Forums

Join
bbPress Support ForumsPluginsmini-plugin to display member # in profile

Info

mini-plugin to display member # in profile

  1. Here's a mini plugin that will cause the profile page to display the member # (handy if you are using pretty permalinks)

    function bb_member_id_in_profile($keys) {	// inserts member id into profile without hacking
    global $self;
    if (empty($self)==true && isset($_GET['tab'])==false && bb_get_location()=="profile-page") {
    	(array) $keys=array_merge(array_slice((array) $keys, 0 , 1), array('ID' => array(0, __('Member #'))), array_slice((array) $keys,  1));
    }
    return (array) $keys;
    }
    add_filter( 'get_profile_info_keys','bb_member_id_in_profile',255);  // last item inserted = first item displayed
  2. You must log in to post.