bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

mini-plugin to display member # in profile

(1 post)
  • Started 3 months ago by _ck_
  • This topic is not a support question
  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
    Posted 3 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.