Index: /branches/plugin/bbp-includes/bbp-caps.php
===================================================================
--- /branches/plugin/bbp-includes/bbp-caps.php	(revision 2811)
+++ /branches/plugin/bbp-includes/bbp-caps.php	(revision 2812)
@@ -7,4 +7,5 @@
  * @subpackage Capabilities
  */
+
 /**
  * Adds bbPress-specific user roles.
Index: /branches/plugin/bbp-includes/bbp-forum-template.php
===================================================================
--- /branches/plugin/bbp-includes/bbp-forum-template.php	(revision 2811)
+++ /branches/plugin/bbp-includes/bbp-forum-template.php	(revision 2812)
@@ -8,5 +8,5 @@
  */
 
-/** START - Forum Loop Functions **********************************************/
+/** Forum Loop ****************************************************************/
 
 /**
@@ -78,5 +78,5 @@
 }
 
-/** FORUM *********************************************************************/
+/** Forum *********************************************************************/
 
 /**
@@ -517,5 +517,5 @@
 }
 
-/** FORUM LAST TOPIC **********************************************************/
+/** Forum Last Topic **********************************************************/
 
 /**
@@ -660,5 +660,5 @@
 	}
 
-/** FORUM LAST REPLY **********************************************************/
+/** Forum Last Reply **********************************************************/
 
 /**
@@ -862,5 +862,5 @@
 	}
 
-/** FORUM COUNTS **************************************************************/
+/** Forum Counts **************************************************************/
 
 /**
Index: /branches/plugin/bbp-includes/bbp-general-template.php
===================================================================
--- /branches/plugin/bbp-includes/bbp-general-template.php	(revision 2811)
+++ /branches/plugin/bbp-includes/bbp-general-template.php	(revision 2812)
@@ -8,5 +8,5 @@
  */
 
-/** START - WordPress Add-on Actions ******************************************/
+/** Add-on Actions ************************************************************/
 
 /**
@@ -32,7 +32,5 @@
 }
 
-/** END - WordPress Add-on Actions ********************************************/
-
-/** START is_ Functions *******************************************************/
+/** is_ ***********************************************************************/
 
 /**
@@ -319,7 +317,5 @@
 }
 
-/** END is_ Functions *********************************************************/
-
-/** START Form Functions ******************************************************/
+/** Forms *********************************************************************/
 
 /**
@@ -619,4 +615,5 @@
 
 	<?php wp_referer_field(); ?>
+
 	<?php wp_nonce_field( 'update-user_' . bbp_get_displayed_user_id() );
 }
@@ -659,7 +656,5 @@
 }
 
-/** END Form Functions ********************************************************/
-
-/** Start Views ***************************************************************/
+/** Views *********************************************************************/
 
 /**
@@ -772,31 +767,42 @@
 	}
 
-/** End Views *****************************************************************/
-
-/** Start General Functions ***************************************************/
-
-/**
- * Display possible error messages inside a template file
- *
- * @since bbPress (r2688)
- *
- * @uses WP_Error bbPress::errors::get_error_codes() To get the error codes
- * @uses WP_Error bbPress::errors::get_error_messages() To get the error
- *                                                       messages
- * @uses is_wp_error() To check if it's a {@link WP_Error}
- */
-function bbp_error_messages() {
-	global $bbp;
-
-	if ( isset( $bbp->errors ) && is_wp_error( $bbp->errors ) && $bbp->errors->get_error_codes() ) : ?>
-
-		<div class="bbp-template-notice error">
-			<p>
-				<?php echo implode( "</p>\n<p>", $bbp->errors->get_error_messages() ); ?>
-			</p>
-		</div>
-
-<?php endif;
-}
+/** Query *********************************************************************/
+
+/**
+ * Get the '_bbp_query_name' setting
+ *
+ * @since bbPress (r2695)
+ *
+ * @uses get_query_var() To get the query var '_bbp_query_name'
+ * @return string To return the query var value
+ */
+function bbp_get_query_name()  {
+	return get_query_var( '_bbp_query_name' );
+}
+
+/**
+ * Set the '_bbp_query_name' setting to $name
+ *
+ * @since bbPress (r2692)
+ *
+ * @param string $name What to set the query var to
+ * @uses set_query_var() To set the query var '_bbp_query_name'
+ */
+function bbp_set_query_name( $name = '' )  {
+	set_query_var( '_bbp_query_name', $name );
+}
+
+/**
+ * Used to clear the '_bbp_query_name' setting
+ *
+ * @since bbPress (r2692)
+ *
+ * @uses bbp_set_query_name() To set the query var '_bbp_query_name' to ''
+ */
+function bbp_reset_query_name() {
+	bbp_set_query_name();
+}
+
+/** Breadcrumbs ***************************************************************/
 
 /**
@@ -890,4 +896,6 @@
 	}
 
+/** Topic Tags ***************************************************************/
+
 /**
  * Output all of the allowed tags in HTML format with attributes.
@@ -919,39 +927,28 @@
 	}
 
-/** Start Query Functions *****************************************************/
-
-/**
- * Get the '_bbp_query_name' setting
- *
- * @since bbPress (r2695)
- *
- * @uses get_query_var() To get the query var '_bbp_query_name'
- * @return string To return the query var value
- */
-function bbp_get_query_name()  {
-	return get_query_var( '_bbp_query_name' );
-}
-
-/**
- * Set the '_bbp_query_name' setting to $name
- *
- * @since bbPress (r2692)
- *
- * @param string $name What to set the query var to
- * @uses set_query_var() To set the query var '_bbp_query_name'
- */
-function bbp_set_query_name( $name = '' )  {
-	set_query_var( '_bbp_query_name', $name );
-}
-
-/**
- * Used to clear the '_bbp_query_name' setting
- *
- * @since bbPress (r2692)
- *
- * @uses bbp_set_query_name() To set the query var '_bbp_query_name' to ''
- */
-function bbp_reset_query_name() {
-	bbp_set_query_name();
+/** Errors ********************************************************************/
+
+/**
+ * Display possible error messages inside a template file
+ *
+ * @since bbPress (r2688)
+ *
+ * @uses WP_Error bbPress::errors::get_error_codes() To get the error codes
+ * @uses WP_Error bbPress::errors::get_error_messages() To get the error
+ *                                                       messages
+ * @uses is_wp_error() To check if it's a {@link WP_Error}
+ */
+function bbp_error_messages() {
+	global $bbp;
+
+	if ( isset( $bbp->errors ) && is_wp_error( $bbp->errors ) && $bbp->errors->get_error_codes() ) : ?>
+
+		<div class="bbp-template-notice error">
+			<p>
+				<?php echo implode( "</p>\n<p>", $bbp->errors->get_error_messages() ); ?>
+			</p>
+		</div>
+
+<?php endif;
 }
 
Index: /branches/plugin/bbp-includes/bbp-loader.php
===================================================================
--- /branches/plugin/bbp-includes/bbp-loader.php	(revision 2811)
+++ /branches/plugin/bbp-includes/bbp-loader.php	(revision 2812)
@@ -2,5 +2,5 @@
 
 /**
- * The main bbPress loader.
+ * bbPress Loader Actions
  *
  * @package bbPress
@@ -9,4 +9,15 @@
 
 /** Main Actions **************************************************************/
+
+/**
+ * Main action responsible for constants, globals, and includes
+ *
+ * @since bbPress (r2599)
+ *
+ * @uses do_action() Calls 'bbp_loaded'
+ */
+function bbp_loaded() {
+	do_action( 'bbp_loaded' );
+}
 
 /**
@@ -52,15 +63,4 @@
 function bbp_setup_globals() {
 	do_action( 'bbp_setup_globals' );
-}
-
-/**
- * Main action responsible for constants, globals, and includes
- *
- * @since bbPress (r2599)
- *
- * @uses do_action() Calls 'bbp_loaded'
- */
-function bbp_loaded() {
-	do_action( 'bbp_loaded' );
 }
 
Index: /branches/plugin/bbp-includes/bbp-options.php
===================================================================
--- /branches/plugin/bbp-includes/bbp-options.php	(revision 2811)
+++ /branches/plugin/bbp-includes/bbp-options.php	(revision 2812)
@@ -24,5 +24,5 @@
 	$options = array (
 
-		/** SETTINGS **********************************************************/
+		/** Settings **********************************************************/
 
 		// Lock post editing after 5 minutes
@@ -47,5 +47,5 @@
 		'_bbp_replies_per_page'     => '15',
 
-		/** SLUGS *************************************************************/
+		/** Slugs *************************************************************/
 
 		// Root slug
@@ -94,5 +94,5 @@
  */
 function bbp_is_favorites_active() {
-	return (bool) get_option( '_bbp_enable_favorites', true );
+	return apply_filters( 'bbp_is_favorites_active', (bool) get_option( '_bbp_enable_favorites', true ) );
 }
 
@@ -106,5 +106,5 @@
  */
 function bbp_is_subscriptions_active() {
-	return (bool) get_option( '_bbp_enable_subscriptions' );
+	return apply_filters( 'bbp_is_subscriptions_active', (bool) get_option( '_bbp_enable_subscriptions' ) );
 }
 
Index: /branches/plugin/bbp-includes/bbp-reply-template.php
===================================================================
--- /branches/plugin/bbp-includes/bbp-reply-template.php	(revision 2811)
+++ /branches/plugin/bbp-includes/bbp-reply-template.php	(revision 2812)
@@ -8,5 +8,5 @@
  */
 
-/** START - Reply Loop Functions **********************************************/
+/** Reply Loop Functions ******************************************************/
 
 /**
@@ -1512,5 +1512,3 @@
 	}
 
-/** END Reply Loop Functions **************************************************/
-
 ?>
Index: /branches/plugin/bbp-includes/bbp-shortcodes.php
===================================================================
--- /branches/plugin/bbp-includes/bbp-shortcodes.php	(revision 2812)
+++ /branches/plugin/bbp-includes/bbp-shortcodes.php	(revision 2812)
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * bbPress Shortcodes
+ *
+ * @package bbPress
+ * @subpackage Shortcodes
+ */
+
+?>
Index: /branches/plugin/bbp-includes/bbp-topic-functions.php
===================================================================
--- /branches/plugin/bbp-includes/bbp-topic-functions.php	(revision 2811)
+++ /branches/plugin/bbp-includes/bbp-topic-functions.php	(revision 2812)
@@ -1200,5 +1200,7 @@
 		}
 	}
-}/** Topic Updaters ************************************************************/
+}
+
+/** Topic Updaters ************************************************************/
 
 /**
Index: /branches/plugin/bbp-includes/bbp-topic-template.php
===================================================================
--- /branches/plugin/bbp-includes/bbp-topic-template.php	(revision 2811)
+++ /branches/plugin/bbp-includes/bbp-topic-template.php	(revision 2812)
@@ -8,5 +8,5 @@
  */
 
-/** START - Topic Loop Functions **********************************************/
+/** Topic Loop ****************************************************************/
 
 /**
@@ -1148,5 +1148,5 @@
 	}
 
-/** TOPIC LAST REPLY **********************************************************/
+/** Topic Last Reply **********************************************************/
 
 /**
Index: /branches/plugin/bbp-includes/bbp-user-template.php
===================================================================
--- /branches/plugin/bbp-includes/bbp-user-template.php	(revision 2811)
+++ /branches/plugin/bbp-includes/bbp-user-template.php	(revision 2812)
@@ -2,5 +2,5 @@
 
 /**
- * bbPress User Functions
+ * bbPress User Template Tags
  *
  * @package bbPress
@@ -8,5 +8,5 @@
  */
 
-/** START User Functions ******************************************************/
+/** Users *********************************************************************/
 
 /**
@@ -57,5 +57,312 @@
 	}
 
-/** START Favorites Functions *************************************************/
+
+/**
+ * Output ID of current user
+ *
+ * @since bbPress (r2574)
+ *
+ * @uses bbp_get_current_user_id() To get the current user id
+ */
+function bbp_current_user_id() {
+	echo bbp_get_current_user_id();
+}
+	/**
+	 * Return ID of current user
+	 *
+	 * @since bbPress (r2574)
+	 *
+	 * @uses bbp_get_user_id() To get the current user id
+	 * @uses apply_filters() Calls 'bbp_get_current_user_id' with the id
+	 * @return int Current user id
+	 */
+	function bbp_get_current_user_id() {
+		return apply_filters( 'bbp_get_current_user_id', bbp_get_user_id( 0, false, true ) );
+	}
+
+/**
+ * Output ID of displayed user
+ *
+ * @since bbPress (r2688)
+ *
+ * @uses bbp_get_displayed_user_id() To get the displayed user id
+ */
+function bbp_displayed_user_id() {
+	echo bbp_get_displayed_user_id();
+}
+	/**
+	 * Return ID of displayed user
+	 *
+	 * @since bbPress (r2688)
+	 *
+	 * @uses bbp_get_user_id() To get the displayed user id
+	 * @uses apply_filters() Calls 'bbp_get_displayed_user_id' with the id
+	 * @return int Displayed user id
+	 */
+	function bbp_get_displayed_user_id() {
+		return apply_filters( 'bbp_get_displayed_user_id', bbp_get_user_id( 0, true, false ) );
+	}
+
+/**
+ * Return a sanitized user field value
+ *
+ * @since bbPress (r2688)
+ *
+ * @param string $field Field to get
+ * @uses sanitize_text_field() To sanitize the field
+ * @uses esc_attr() To sanitize the field
+ * @return string|bool Value of the field if it exists, else false
+ */
+function bbp_get_displayed_user_field( $field = '' ) {
+	global $bbp;
+
+	// Return field if exists
+	if ( isset( $bbp->displayed_user->$field ) )
+		return esc_attr( sanitize_text_field( $bbp->displayed_user->$field ) );
+
+	// Return empty
+	return false;
+}
+
+/**
+ * Output name of current user
+ *
+ * @since bbPress (r2574)
+ *
+ * @uses bbp_get_current_user_name() To get the current user name
+ */
+function bbp_current_user_name() {
+	echo bbp_get_current_user_name();
+}
+	/**
+	 * Return name of current user
+	 *
+	 * @since bbPress (r2574)
+	 *
+	 * @uses apply_filters() Calls 'bbp_get_current_user_name' with the
+	 *                        current user name
+	 * @return string
+	 */
+	function bbp_get_current_user_name() {
+		global $user_identity;
+
+		if ( is_user_logged_in() )
+			$current_user_name = $user_identity;
+		else
+			$current_user_name = __( 'Anonymous', 'bbpress' );
+
+		return apply_filters( 'bbp_get_current_user_name', $current_user_name );
+	}
+
+/**
+ * Output avatar of current user
+ *
+ * @since bbPress (r2574)
+ *
+ * @param int $size Size of the avatar. Defaults to 40
+ * @uses bbp_get_current_user_avatar() To get the current user avatar
+ */
+function bbp_current_user_avatar( $size = 40 ) {
+	echo bbp_get_current_user_avatar( $size );
+}
+
+	/**
+	 * Return avatar of current user
+	 *
+	 * @since bbPress (r2574)
+	 *
+	 * @param int $size Size of the avatar. Defaults to 40
+	 * @uses bbp_get_current_user_id() To get the current user id
+	 * @uses bbp_get_current_anonymous_user_data() To get the current
+	 *                                              anonymous user's email
+	 * @uses get_avatar() To get the avatar
+	 * @uses apply_filters() Calls 'bbp_get_current_user_avatar' with the
+	 *                        avatar and size
+	 * @return string Current user avatar
+	 */
+	function bbp_get_current_user_avatar( $size = 40 ) {
+
+		if ( !$user = bbp_get_current_user_id() )
+			$user = bbp_get_current_anonymous_user_data( 'email' );
+
+		return apply_filters( 'bbp_get_current_user_avatar', get_avatar( $user, $size ), $size );
+	}
+
+/**
+ * Output link to the profile page of a user
+ *
+ * @since bbPress (r2688)
+ *
+ * @param int $user_id Optional. User id
+ * @uses bbp_get_user_profile_link() To get user profile link
+ */
+function bbp_user_profile_link( $user_id = 0 ) {
+	echo bbp_get_user_profile_link( $user_id );
+}
+	/**
+	 * Return link to the profile page of a user
+	 *
+	 * @since bbPress (r2688)
+	 *
+	 * @param int $user_id Optional. User id
+	 * @uses bbp_get_user_id() To get user id
+	 * @uses get_userdata() To get user data
+	 * @uses bbp_get_user_profile_url() To get user profile url
+	 * @uses apply_filters() Calls 'bbp_get_user_profile_link' with the user
+	 *                        profile link and user id
+	 * @return string User profile link
+	 */
+	function bbp_get_user_profile_link( $user_id = 0 ) {
+		if ( !$user_id = bbp_get_user_id( $user_id ) )
+			return false;
+
+		$user      = get_userdata( $user_id );
+		$name      = esc_attr( $user->display_name );
+		$user_link = '<a href="' . bbp_get_user_profile_url( $user_id ) . '" title="' . $name . '">' . $name . '</a>';
+
+		return apply_filters( 'bbp_get_user_profile_link', $user_link, $user_id );
+	}
+
+/**
+ * Output URL to the profile page of a user
+ *
+ * @since bbPress (r2688)
+ *
+ * @param int $user_id Optional. User id
+ * @param string $user_nicename Optional. User nicename
+ * @uses bbp_get_user_profile_url() To get user profile url
+ */
+function bbp_user_profile_url( $user_id = 0, $user_nicename = '' ) {
+	echo bbp_get_user_profile_url( $user_id );
+}
+	/**
+	 * Return URL to the profile page of a user
+	 *
+	 * @since bbPress (r2688)
+	 *
+	 * @param int $user_id Optional. User id
+	 * @param string $user_nicename Optional. User nicename
+	 * @uses bbp_get_user_id() To get user id
+	 * @uses add_query_arg() To add custom args to the url
+	 * @uses home_url() To get blog home url
+	 * @uses apply_filters() Calls 'bbp_get_user_profile_url' with the user
+	 *                        profile url, user id and user nicename
+	 * @return string User profile url
+	 */
+	function bbp_get_user_profile_url( $user_id = 0, $user_nicename = '' ) {
+		global $wp_rewrite, $bbp;
+
+		// Use displayed user ID if there is one, and one isn't requested
+		if ( !$user_id = bbp_get_user_id( $user_id ) )
+			return false;
+
+		// No pretty permalinks
+		if ( empty( $wp_rewrite->permalink_structure ) ) {
+			$url = add_query_arg( array( 'bbp_user' => $user_id ), home_url( '/' ) );
+
+		// Get URL safe user slug
+		} else {
+			$url = $wp_rewrite->front . $bbp->user_slug . '/%bbp_user%';
+
+			if ( empty( $user_nicename ) ) {
+				$user = get_userdata( $user_id );
+				if ( !empty( $user->user_nicename ) )
+					$user_nicename = $user->user_nicename;
+			}
+
+			$url = str_replace( '%bbp_user%', $user_nicename, $url );
+			$url = home_url( user_trailingslashit( $url ) );
+		}
+
+		return apply_filters( 'bbp_get_user_profile_url', $url, $user_id, $user_nicename );
+
+	}
+
+/**
+ * Output link to the profile edit page of a user
+ *
+ * @since bbPress (r2688)
+ *
+ * @param int $user_id Optional. User id
+ * @uses bbp_get_user_profile_edit_link() To get user profile edit link
+ */
+function bbp_user_profile_edit_link( $user_id = 0 ) {
+	echo bbp_get_user_profile_edit_link( $user_id );
+}
+	/**
+	 * Return link to the profile edit page of a user
+	 *
+	 * @since bbPress (r2688)
+	 *
+	 * @param int $user_id Optional. User id
+	 * @uses bbp_get_user_id() To get user id
+	 * @uses get_userdata() To get user data
+	 * @uses bbp_get_user_profile_edit_url() To get user profile edit url
+	 * @uses apply_filters() Calls 'bbp_get_user_profile_link' with the edit
+	 *                        link and user id
+	 * @return string User profile edit link
+	 */
+	function bbp_get_user_profile_edit_link( $user_id = 0 ) {
+		if ( !$user_id = bbp_get_user_id( $user_id ) )
+			return false;
+
+		$user      = get_userdata( $user_id );
+		$name      = $user->display_name;
+		$edit_link = '<a href="' . bbp_get_user_profile_url( $user_id ) . '" title="' . esc_attr( $name ) . '">' . $name . '</a>';
+		return apply_filters( 'bbp_get_user_profile_link', $edit_link, $user_id );
+	}
+
+/**
+ * Output URL to the profile edit page of a user
+ *
+ * @since bbPress (r2688)
+ *
+ * @param int $user_id Optional. User id
+ * @param string $user_nicename Optional. User nicename
+ * @uses bbp_get_user_profile_edit_url() To get user profile edit url
+ */
+function bbp_user_profile_edit_url( $user_id = 0, $user_nicename = '' ) {
+	echo bbp_get_user_profile_edit_url( $user_id );
+}
+	/**
+	 * Return URL to the profile edit page of a user
+	 *
+	 * @since bbPress (r2688)
+	 *
+	 * @param int $user_id Optional. User id
+	 * @param string $user_nicename Optional. User nicename
+	 * @uses bbp_get_user_id() To get user id
+	 * @uses add_query_arg() To add custom args to the url
+	 * @uses home_url() To get blog home url
+	 * @uses apply_filters() Calls 'bbp_get_user_edit_profile_url' with the
+	 *                        edit profile url, user id and user nicename
+	 * @return string
+	 */
+	function bbp_get_user_profile_edit_url( $user_id = 0, $user_nicename = '' ) {
+		global $wp_rewrite, $bbp;
+
+		if ( !$user_id = bbp_get_user_id( $user_id ) )
+			return;
+
+		if ( empty( $wp_rewrite->permalink_structure ) ) {
+			$url = add_query_arg( array( 'bbp_user' => $user_id, 'edit' => '1' ), home_url( '/' ) );
+		} else {
+			$url = $wp_rewrite->front . $bbp->user_slug . '/%bbp_user%/edit';
+
+			if ( empty( $user_nicename ) ) {
+				$user = get_userdata( $user_id );
+				if ( !empty( $user->user_nicename ) )
+					$user_nicename = $user->user_nicename;
+			}
+
+			$url = str_replace( '%bbp_user%', $user_nicename, $url );
+			$url = home_url( user_trailingslashit( $url ) );
+		}
+
+		return apply_filters( 'bbp_get_user_edit_profile_url', $url, $user_id, $user_nicename );
+
+	}
+
+/** Favorites *****************************************************************/
 
 /**
@@ -173,7 +480,5 @@
 	}
 
-/** END Favorites Functions ***************************************************/
-
-/** START Subscriptions Functions *********************************************/
+/** Subscriptions *************************************************************/
 
 /**
@@ -287,311 +592,4 @@
 	}
 
-/** END Subscriptions Functions ***********************************************/
-
-/**
- * Output ID of current user
- *
- * @since bbPress (r2574)
- *
- * @uses bbp_get_current_user_id() To get the current user id
- */
-function bbp_current_user_id() {
-	echo bbp_get_current_user_id();
-}
-	/**
-	 * Return ID of current user
-	 *
-	 * @since bbPress (r2574)
-	 *
-	 * @uses bbp_get_user_id() To get the current user id
-	 * @uses apply_filters() Calls 'bbp_get_current_user_id' with the id
-	 * @return int Current user id
-	 */
-	function bbp_get_current_user_id() {
-		return apply_filters( 'bbp_get_current_user_id', bbp_get_user_id( 0, false, true ) );
-	}
-
-/**
- * Output ID of displayed user
- *
- * @since bbPress (r2688)
- *
- * @uses bbp_get_displayed_user_id() To get the displayed user id
- */
-function bbp_displayed_user_id() {
-	echo bbp_get_displayed_user_id();
-}
-	/**
-	 * Return ID of displayed user
-	 *
-	 * @since bbPress (r2688)
-	 *
-	 * @uses bbp_get_user_id() To get the displayed user id
-	 * @uses apply_filters() Calls 'bbp_get_displayed_user_id' with the id
-	 * @return int Displayed user id
-	 */
-	function bbp_get_displayed_user_id() {
-		return apply_filters( 'bbp_get_displayed_user_id', bbp_get_user_id( 0, true, false ) );
-	}
-
-/**
- * Return a sanitized user field value
- *
- * @since bbPress (r2688)
- *
- * @param string $field Field to get
- * @uses sanitize_text_field() To sanitize the field
- * @uses esc_attr() To sanitize the field
- * @return string|bool Value of the field if it exists, else false
- */
-function bbp_get_displayed_user_field( $field = '' ) {
-	global $bbp;
-
-	// Return field if exists
-	if ( isset( $bbp->displayed_user->$field ) )
-		return esc_attr( sanitize_text_field( $bbp->displayed_user->$field ) );
-
-	// Return empty
-	return false;
-}
-
-/**
- * Output name of current user
- *
- * @since bbPress (r2574)
- *
- * @uses bbp_get_current_user_name() To get the current user name
- */
-function bbp_current_user_name() {
-	echo bbp_get_current_user_name();
-}
-	/**
-	 * Return name of current user
-	 *
-	 * @since bbPress (r2574)
-	 *
-	 * @uses apply_filters() Calls 'bbp_get_current_user_name' with the
-	 *                        current user name
-	 * @return string
-	 */
-	function bbp_get_current_user_name() {
-		global $user_identity;
-
-		if ( is_user_logged_in() )
-			$current_user_name = $user_identity;
-		else
-			$current_user_name = __( 'Anonymous', 'bbpress' );
-
-		return apply_filters( 'bbp_get_current_user_name', $current_user_name );
-	}
-
-/**
- * Output avatar of current user
- *
- * @since bbPress (r2574)
- *
- * @param int $size Size of the avatar. Defaults to 40
- * @uses bbp_get_current_user_avatar() To get the current user avatar
- */
-function bbp_current_user_avatar( $size = 40 ) {
-	echo bbp_get_current_user_avatar( $size );
-}
-
-	/**
-	 * Return avatar of current user
-	 *
-	 * @since bbPress (r2574)
-	 *
-	 * @param int $size Size of the avatar. Defaults to 40
-	 * @uses bbp_get_current_user_id() To get the current user id
-	 * @uses bbp_get_current_anonymous_user_data() To get the current
-	 *                                              anonymous user's email
-	 * @uses get_avatar() To get the avatar
-	 * @uses apply_filters() Calls 'bbp_get_current_user_avatar' with the
-	 *                        avatar and size
-	 * @return string Current user avatar
-	 */
-	function bbp_get_current_user_avatar( $size = 40 ) {
-
-		if ( !$user = bbp_get_current_user_id() )
-			$user = bbp_get_current_anonymous_user_data( 'email' );
-
-		return apply_filters( 'bbp_get_current_user_avatar', get_avatar( $user, $size ), $size );
-	}
-
-/**
- * Output link to the profile page of a user
- *
- * @since bbPress (r2688)
- *
- * @param int $user_id Optional. User id
- * @uses bbp_get_user_profile_link() To get user profile link
- */
-function bbp_user_profile_link( $user_id = 0 ) {
-	echo bbp_get_user_profile_link( $user_id );
-}
-	/**
-	 * Return link to the profile page of a user
-	 *
-	 * @since bbPress (r2688)
-	 *
-	 * @param int $user_id Optional. User id
-	 * @uses bbp_get_user_id() To get user id
-	 * @uses get_userdata() To get user data
-	 * @uses bbp_get_user_profile_url() To get user profile url
-	 * @uses apply_filters() Calls 'bbp_get_user_profile_link' with the user
-	 *                        profile link and user id
-	 * @return string User profile link
-	 */
-	function bbp_get_user_profile_link( $user_id = 0 ) {
-		if ( !$user_id = bbp_get_user_id( $user_id ) )
-			return false;
-
-		$user      = get_userdata( $user_id );
-		$name      = esc_attr( $user->display_name );
-		$user_link = '<a href="' . bbp_get_user_profile_url( $user_id ) . '" title="' . $name . '">' . $name . '</a>';
-
-		return apply_filters( 'bbp_get_user_profile_link', $user_link, $user_id );
-	}
-
-/**
- * Output URL to the profile page of a user
- *
- * @since bbPress (r2688)
- *
- * @param int $user_id Optional. User id
- * @param string $user_nicename Optional. User nicename
- * @uses bbp_get_user_profile_url() To get user profile url
- */
-function bbp_user_profile_url( $user_id = 0, $user_nicename = '' ) {
-	echo bbp_get_user_profile_url( $user_id );
-}
-	/**
-	 * Return URL to the profile page of a user
-	 *
-	 * @since bbPress (r2688)
-	 *
-	 * @param int $user_id Optional. User id
-	 * @param string $user_nicename Optional. User nicename
-	 * @uses bbp_get_user_id() To get user id
-	 * @uses add_query_arg() To add custom args to the url
-	 * @uses home_url() To get blog home url
-	 * @uses apply_filters() Calls 'bbp_get_user_profile_url' with the user
-	 *                        profile url, user id and user nicename
-	 * @return string User profile url
-	 */
-	function bbp_get_user_profile_url( $user_id = 0, $user_nicename = '' ) {
-		global $wp_rewrite, $bbp;
-
-		// Use displayed user ID if there is one, and one isn't requested
-		if ( !$user_id = bbp_get_user_id( $user_id ) )
-			return false;
-
-		// No pretty permalinks
-		if ( empty( $wp_rewrite->permalink_structure ) ) {
-			$url = add_query_arg( array( 'bbp_user' => $user_id ), home_url( '/' ) );
-
-		// Get URL safe user slug
-		} else {
-			$url = $wp_rewrite->front . $bbp->user_slug . '/%bbp_user%';
-
-			if ( empty( $user_nicename ) ) {
-				$user = get_userdata( $user_id );
-				if ( !empty( $user->user_nicename ) )
-					$user_nicename = $user->user_nicename;
-			}
-
-			$url = str_replace( '%bbp_user%', $user_nicename, $url );
-			$url = home_url( user_trailingslashit( $url ) );
-		}
-
-		return apply_filters( 'bbp_get_user_profile_url', $url, $user_id, $user_nicename );
-
-	}
-
-/**
- * Output link to the profile edit page of a user
- *
- * @since bbPress (r2688)
- *
- * @param int $user_id Optional. User id
- * @uses bbp_get_user_profile_edit_link() To get user profile edit link
- */
-function bbp_user_profile_edit_link( $user_id = 0 ) {
-	echo bbp_get_user_profile_edit_link( $user_id );
-}
-	/**
-	 * Return link to the profile edit page of a user
-	 *
-	 * @since bbPress (r2688)
-	 *
-	 * @param int $user_id Optional. User id
-	 * @uses bbp_get_user_id() To get user id
-	 * @uses get_userdata() To get user data
-	 * @uses bbp_get_user_profile_edit_url() To get user profile edit url
-	 * @uses apply_filters() Calls 'bbp_get_user_profile_link' with the edit
-	 *                        link and user id
-	 * @return string User profile edit link
-	 */
-	function bbp_get_user_profile_edit_link( $user_id = 0 ) {
-		if ( !$user_id = bbp_get_user_id( $user_id ) )
-			return false;
-
-		$user      = get_userdata( $user_id );
-		$name      = $user->display_name;
-		$edit_link = '<a href="' . bbp_get_user_profile_url( $user_id ) . '" title="' . esc_attr( $name ) . '">' . $name . '</a>';
-		return apply_filters( 'bbp_get_user_profile_link', $edit_link, $user_id );
-	}
-
-/**
- * Output URL to the profile edit page of a user
- *
- * @since bbPress (r2688)
- *
- * @param int $user_id Optional. User id
- * @param string $user_nicename Optional. User nicename
- * @uses bbp_get_user_profile_edit_url() To get user profile edit url
- */
-function bbp_user_profile_edit_url( $user_id = 0, $user_nicename = '' ) {
-	echo bbp_get_user_profile_edit_url( $user_id );
-}
-	/**
-	 * Return URL to the profile edit page of a user
-	 *
-	 * @since bbPress (r2688)
-	 *
-	 * @param int $user_id Optional. User id
-	 * @param string $user_nicename Optional. User nicename
-	 * @uses bbp_get_user_id() To get user id
-	 * @uses add_query_arg() To add custom args to the url
-	 * @uses home_url() To get blog home url
-	 * @uses apply_filters() Calls 'bbp_get_user_edit_profile_url' with the
-	 *                        edit profile url, user id and user nicename
-	 * @return string
-	 */
-	function bbp_get_user_profile_edit_url( $user_id = 0, $user_nicename = '' ) {
-		global $wp_rewrite, $bbp;
-
-		if ( !$user_id = bbp_get_user_id( $user_id ) )
-			return;
-
-		if ( empty( $wp_rewrite->permalink_structure ) ) {
-			$url = add_query_arg( array( 'bbp_user' => $user_id, 'edit' => '1' ), home_url( '/' ) );
-		} else {
-			$url = $wp_rewrite->front . $bbp->user_slug . '/%bbp_user%/edit';
-
-			if ( empty( $user_nicename ) ) {
-				$user = get_userdata( $user_id );
-				if ( !empty( $user->user_nicename ) )
-					$user_nicename = $user->user_nicename;
-			}
-
-			$url = str_replace( '%bbp_user%', $user_nicename, $url );
-			$url = home_url( user_trailingslashit( $url ) );
-		}
-
-		return apply_filters( 'bbp_get_user_edit_profile_url', $url, $user_id, $user_nicename );
-
-	}
 
 /** Edit User *****************************************************************/
@@ -728,5 +726,3 @@
 }
 
-/** END User Functions ********************************************************/
-
 ?>
Index: /branches/plugin/bbp-includes/bbp-widgets.php
===================================================================
--- /branches/plugin/bbp-includes/bbp-widgets.php	(revision 2811)
+++ /branches/plugin/bbp-includes/bbp-widgets.php	(revision 2812)
@@ -98,4 +98,5 @@
 		$instance['title']        = strip_tags( $new_instance['title']        );
 		$instance['parent_forum'] = absint    ( $new_instance['parent_forum'] );
+
 		return $instance;
 	}
@@ -112,7 +113,5 @@
 	function form( $instance ) {
 		$title        = !empty( $instance['title']        ) ? esc_attr( $instance['title']        ) : '';
-		$parent_forum = !empty( $instance['parent_forum'] ) ? esc_attr( $instance['parent_forum'] ) : '';
-
-		?>
+		$parent_forum = !empty( $instance['parent_forum'] ) ? esc_attr( $instance['parent_forum'] ) : ''; ?>
 
 		<p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
@@ -129,5 +128,4 @@
 		<?php
 	}
-
 }
 
@@ -200,4 +198,5 @@
 
 			<ul>
+
 				<?php while ( bbp_topics() ) : bbp_the_topic(); ?>
 
@@ -231,13 +230,9 @@
 			<ul>
 
+				<?php foreach ( $topics as $topic_id => $topic_reply_count ) : ?>
+
+					<li><a class="bbp-topic-title" href="<?php bbp_topic_permalink( $topic_id ); ?>" title="<?php bbp_topic_title( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a><?php if ( $show_date == 'on' ) _e( ', ' . bbp_get_topic_last_active( $topic_id ) . ' ago' ); ?></li>
+
 				<?php
-
-				foreach ( $topics as $topic_id => $topic_reply_count ) :
-
-					?>
-
-					<li><a class="bbp-topic-title" href="<?php bbp_topic_permalink( $topic_id ); ?>" title="<?php bbp_topic_title( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a><?php if ( $show_date == 'on' ) _e( ', ' . bbp_get_topic_last_active( $topic_id ) . ' ago' ); ?></li>
-
-					<?php
 
 					$topic_count++;
@@ -246,7 +241,5 @@
 						break;
 
-				endforeach;
-
-				?>
+				endforeach; ?>
 
 			</ul>
@@ -272,4 +265,5 @@
 		$instance['show_date'] = strip_tags( $new_instance['show_date'] );
 		$instance['pop_check'] = strip_tags( $new_instance['pop_check'] );
+
 		return $instance;
 	}
@@ -288,7 +282,5 @@
 		$max_shown = !empty( $instance['max_shown'] ) ? esc_attr( $instance['max_shown'] ) : '';
 		$show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
-		$pop_check = !empty( $instance['pop_check'] ) ? esc_attr( $instance['pop_check'] ) : '';
-
-		?>
+		$pop_check = !empty( $instance['pop_check'] ) ? esc_attr( $instance['pop_check'] ) : ''; ?>
 
 		<p><label for="<?php echo $this->get_field_id( 'title'     ); ?>"><?php _e( 'Title:',                  'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title'     ); ?>" name="<?php echo $this->get_field_name( 'title'     ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
@@ -405,4 +397,5 @@
 		$instance['max_shown'] = strip_tags( $new_instance['max_shown'] );
 		$instance['show_date'] = strip_tags( $new_instance['show_date'] );
+
 		return $instance;
 	}
@@ -420,7 +413,5 @@
 		$title     = !empty( $instance['title']     ) ? esc_attr( $instance['title']     ) : '';
 		$max_shown = !empty( $instance['max_shown'] ) ? esc_attr( $instance['max_shown'] ) : '';
-		$show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
-
-		?>
+		$show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : ''; ?>
 
 		<p><label for="<?php echo $this->get_field_id( 'title'     ); ?>"><?php _e( 'Title:',                   'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title'     ); ?>" name="<?php echo $this->get_field_name( 'title'     ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
@@ -430,5 +421,4 @@
 		<?php
 	}
-
 }
 
