Index: src/bp-groups/bp-groups-template.php
===================================================================
--- src/bp-groups/bp-groups-template.php	(revision 11248)
+++ src/bp-groups/bp-groups-template.php	(working copy)
@@ -4522,33 +4522,9 @@
  * @since 2.0.0
  */
 function bp_groups_members_filter() {
-	?>
-	<li id="group_members-order-select" class="last filter">
-		<label for="group_members-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
-		<select id="group_members-order-by">
-			<option value="last_joined"><?php _e( 'Newest', 'buddypress' ); ?></option>
-			<option value="first_joined"><?php _e( 'Oldest', 'buddypress' ); ?></option>
 
-			<?php if ( bp_is_active( 'activity' ) ) : ?>
-				<option value="group_activity"><?php _e( 'Group Activity', 'buddypress' ); ?></option>
-			<?php endif; ?>
+	bp_get_template_part('common/filters/select-order-filters');
 
-			<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
-
-			<?php
-
-			/**
-			 * Fires at the end of the Group members filters select input.
-			 *
-			 * Useful for plugins to add more filter options.
-			 *
-			 * @since 2.0.0
-			 */
-			do_action( 'bp_groups_members_order_options' ); ?>
-
-		</select>
-	</li>
-	<?php
 }
 
 /*
Index: src/bp-templates/bp-legacy/buddypress/activity/index.php
===================================================================
--- src/bp-templates/bp-legacy/buddypress/activity/index.php	(revision 11248)
+++ src/bp-templates/bp-legacy/buddypress/activity/index.php	(working copy)
@@ -153,24 +153,7 @@
 			 */
 			do_action( 'bp_activity_syndication_options' ); ?>
 
-			<li id="activity-filter-select" class="last">
-				<label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
-				<select id="activity-filter-by">
-					<option value="-1"><?php _e( '&mdash; Everything &mdash;', 'buddypress' ); ?></option>
-
-					<?php bp_activity_show_filters(); ?>
-
-					<?php
-
-					/**
-					 * Fires inside the select input for activity filter by options.
-					 *
-					 * @since 1.2.0
-					 */
-					do_action( 'bp_activity_filter_options' ); ?>
-
-				</select>
-			</li>
+			<?php bp_get_template_part('common/filters/select-order-filters'); ?>
 		</ul>
 	</div><!-- .item-list-tabs -->
 
Index: src/bp-templates/bp-legacy/buddypress/blogs/index.php
===================================================================
--- src/bp-templates/bp-legacy/buddypress/blogs/index.php	(revision 11248)
+++ src/bp-templates/bp-legacy/buddypress/blogs/index.php	(working copy)
@@ -91,25 +91,7 @@
 				 */
 				do_action( 'bp_blogs_directory_blog_sub_types' ); ?>
 
-				<li id="blogs-order-select" class="last filter">
-
-					<label for="blogs-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
-					<select id="blogs-order-by">
-						<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
-						<option value="newest"><?php _e( 'Newest', 'buddypress' ); ?></option>
-						<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
-
-						<?php
-
-						/**
-						 * Fires inside the select input listing blogs orderby options.
-						 *
-						 * @since 1.2.0
-						 */
-						do_action( 'bp_blogs_directory_order_options' ); ?>
-
-					</select>
-				</li>
+				<?php bp_get_template_part('common/filters/select-order-filters'); ?>
 			</ul>
 		</div>
 
Index: src/bp-templates/bp-legacy/buddypress/common/filters/select-order-filters.php
===================================================================
--- src/bp-templates/bp-legacy/buddypress/common/filters/select-order-filters.php	(nonexistent)
+++ src/bp-templates/bp-legacy/buddypress/common/filters/select-order-filters.php	(working copy)
@@ -0,0 +1,235 @@
+<?php
+/**
+* Build Select / Order By filters
+*
+* @since 2.8.0
+*/
+
+/**
+ * Check current components & actions
+ *
+ * Build id's, labels.
+ *
+ * @since 2.8.0
+ */
+function bp_current_object_parts() {
+	$current_component = bp_current_component();
+	$current_action    = bp_current_action();
+	$component = array();
+
+		$component['object']    = $current_component;
+
+		if ( bp_is_group() ) :
+			$component['li_id']     = 'groups_members-order-select';
+			$component['select_id'] = 'groups_members-order-select';
+			$component['order_by']  = 'groups_members-order-by';
+			$component['object']    = $current_action;
+
+		elseif( 'activity' === $current_component ) :
+			$component['li_id']     = bp_current_component() . '-filter-select';
+			$component['select_id'] = $current_component . '-filter-by';
+
+		elseif( 'friends' == $current_component) :
+			$component['li_id']     = 'members-order-select';
+			$component['select_id'] = 'members-friends';
+
+		elseif( 'notifications' === $current_component ) :
+			$component['li_id']     = 'members-order-select';
+			$component['select_id'] = 'notifications-sort-order-list';
+
+		else:
+			$component['li_id']     = $current_component . '-order-select';
+			$component['select_id'] = $current_component . '-order-by';
+		endif;
+
+		if ( 'activity' === $component['object'] || 'friends' === $component['object'] ) :
+			$component['label'] = __( 'Show:', 'buddypress' );;
+		else:
+			$component['label'] = __( 'Order By:', 'buddypress' );
+		endif;
+
+		return (object) $component;
+}
+$component = bp_current_object_parts();
+?>
+
+
+<?php
+// Output the markup for filters.
+// Notifications builds it's own complete form markup in bp-notifications-template.php
+?>
+<li id="<?php echo $component->li_id; ?>" class="last filter">
+
+	<?php if( 'notifications' === $component->object ) :
+		bp_component_filters();
+	else: ?>
+
+	<label for="<?php echo $component->select_id; ?>"><?php echo $component->label ?></label>
+	<select id="<?php echo $component->select_id; ?>">
+
+		<?php bp_component_filters(); ?>
+
+	</select>
+
+	<?php endif; ?>
+
+</li>
+
+
+<?php
+/**
+ * The Component option filters
+ *
+ * @since 2.8.0
+*/
+
+function bp_component_filters() {
+	echo bp_get_component_filters();
+}
+
+function bp_get_component_filters() {
+
+$component = bp_current_object_parts();
+
+	switch ( $component->object ) {
+		case 'activity':
+
+			if(  ! bp_is_group() ) { ?>
+				<option value="-1"><?php _e( '&mdash; Everything &mdash;', 'buddypress' ); ?></option>
+			<?php }
+
+			bp_activity_show_filters();
+
+			/**
+				* Fires inside the select input for activity filter by options.
+				*
+				* @since 1.2.0
+				*/
+			do_action( 'bp_activity_filter_options' );
+		break;
+
+		case 'blogs' :
+			bp_get_order_by_options();
+
+			/**
+				* Fires inside the select input listing blogs orderby options.
+				*
+				* @since 1.2.0
+				*/
+			do_action( 'bp_blogs_directory_order_options' );
+		break;
+
+		case 'groups' :
+			bp_get_order_by_options();
+
+			/**
+				* Fires inside the groups directory group order options.
+				*
+				* @since 1.2.0
+				*/
+			do_action( 'bp_groups_directory_order_options' );
+		break;
+
+		case 'members' :
+			if( bp_is_group() ) {
+
+				bp_get_order_by_options();
+
+				/**
+					* Fires inside the members group order options select input.
+					*
+					* @since 1.2.0
+					*/
+					do_action( 'bp_member_group_order_options' );
+
+			} else {
+
+				bp_get_order_by_options();
+
+				/**
+					* Fires inside the members directory member order options.
+					*
+					* @since 1.2.0
+					*/
+					do_action( 'bp_members_directory_order_options' );
+			}
+		break;
+
+		case 'friends' :
+			bp_get_order_by_options();
+
+			/**
+				* Fires inside the members friends order options select input.
+				*
+				* @since 2.0.0
+				*/
+				do_action( 'bp_member_friends_order_options' );
+		break;
+
+		case 'notifications' :
+			bp_notifications_sort_order_form();
+
+		break;
+
+	}
+
+	return;
+}
+
+/**
+ * Order by option elements
+ *
+ * @since 2.8.0
+*/
+function bp_get_order_by_options() {
+	$component = bp_current_object_parts();
+
+	// Labels change depending on the component or action
+	// so build labels here to use in returned markup.
+	$label = array();
+	$label['active']  = __( 'Last Active', 'buddypress' );
+	$label['popular'] = __('Most Members', 'buddypress');
+	$label['group_activity'] = __('Group Activity', 'buddypress');
+
+	if( 'groups' === $component->object ) {
+		$label['newest'] = __('Newly Created', 'buddypress');
+
+	} elseif('members' === $component->object ) {
+		$label['newest'] = __('Newest Registered', 'buddypress');
+
+	} else {
+		$label['newest'] = __('Newest', 'buddypress');
+	}
+
+	$label['alphabetical'] = __('Alphabetical', 'buddypress');
+	?>
+
+	<?php if( bp_is_group() && 'members' === $component->object ) { ?>
+		<option value="last_joined"><?php _e( 'Newest', 'buddypress' ); ?></option>
+		<option value="first_joined"><?php _e( 'Oldest', 'buddypress' ); ?></option>
+	<?php } ?>
+
+	<?php if ( bp_is_active( 'activity' ) && bp_is_group() ) : ?>
+		<option value="group_activity"><?php echo $label['group_activity']; ?></option>
+
+	<?php else: ?>
+		<option value="active"><?php echo $label['active']; ?></option>
+	<?php endif; ?>
+
+	<?php if( 'groups' === $component->object ) { ?>
+		<option value="popular"><?php echo $label['popular']; ?></option>
+	<?php } ?>
+
+	<?php if( !bp_is_group() ) { ?>
+		<option value="newest"><?php echo $label['newest']; ?></option>
+	<?php } ?>
+
+<?php		if( 'members' === $component->object && bp_is_active('xprofile') ) { ?>
+		<option value="alphabetical"><?php echo $label['alphabetical']; ?></option>
+<?php	} else { ?>
+		<option value="alphabetical"><?php echo $label['alphabetical']; ?></option>
+<?php } ?>
+
+	<?php
+	return;
+}
Index: src/bp-templates/bp-legacy/buddypress/groups/index.php
===================================================================
--- src/bp-templates/bp-legacy/buddypress/groups/index.php	(revision 11248)
+++ src/bp-templates/bp-legacy/buddypress/groups/index.php	(working copy)
@@ -87,26 +87,7 @@
 				 */
 				do_action( 'bp_groups_directory_group_types' ); ?>
 
-				<li id="groups-order-select" class="last filter">
-
-					<label for="groups-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
-
-					<select id="groups-order-by">
-						<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
-						<option value="popular"><?php _e( 'Most Members', 'buddypress' ); ?></option>
-						<option value="newest"><?php _e( 'Newly Created', 'buddypress' ); ?></option>
-						<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
-
-						<?php
-
-						/**
-						 * Fires inside the groups directory group order options.
-						 *
-						 * @since 1.2.0
-						 */
-						do_action( 'bp_groups_directory_order_options' ); ?>
-					</select>
-				</li>
+				<?php bp_get_template_part('common/filters/select-order-filters'); ?>
 			</ul>
 		</div>
 
Index: src/bp-templates/bp-legacy/buddypress/members/index.php
===================================================================
--- src/bp-templates/bp-legacy/buddypress/members/index.php	(revision 11248)
+++ src/bp-templates/bp-legacy/buddypress/members/index.php	(working copy)
@@ -87,26 +87,7 @@
 				 */
 				do_action( 'bp_members_directory_member_sub_types' ); ?>
 
-				<li id="members-order-select" class="last filter">
-					<label for="members-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
-					<select id="members-order-by">
-						<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
-						<option value="newest"><?php _e( 'Newest Registered', 'buddypress' ); ?></option>
-
-						<?php if ( bp_is_active( 'xprofile' ) ) : ?>
-							<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
-						<?php endif; ?>
-
-						<?php
-
-						/**
-						 * Fires inside the members directory member order options.
-						 *
-						 * @since 1.2.0
-						 */
-						do_action( 'bp_members_directory_order_options' ); ?>
-					</select>
-				</li>
+				<?php bp_get_template_part('common/filters/select-order-filters'); ?>
 			</ul>
 		</div>
 
Index: src/bp-templates/bp-legacy/buddypress/members/single/friends.php
===================================================================
--- src/bp-templates/bp-legacy/buddypress/members/single/friends.php	(revision 11248)
+++ src/bp-templates/bp-legacy/buddypress/members/single/friends.php	(working copy)
@@ -14,26 +14,8 @@
 
 		<?php if ( !bp_is_current_action( 'requests' ) ) : ?>
 
-			<li id="members-order-select" class="last filter">
+		<?php bp_get_template_part('common/filters/select-order-filters'); ?>
 
-				<label for="members-friends"><?php _e( 'Order By:', 'buddypress' ); ?></label>
-				<select id="members-friends">
-					<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
-					<option value="newest"><?php _e( 'Newest Registered', 'buddypress' ); ?></option>
-					<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
-
-					<?php
-
-					/**
-					 * Fires inside the members friends order options select input.
-					 *
-					 * @since 2.0.0
-					 */
-					do_action( 'bp_member_friends_order_options' ); ?>
-
-				</select>
-			</li>
-
 		<?php endif; ?>
 
 	</ul>
Index: src/bp-templates/bp-legacy/buddypress/members/single/groups.php
===================================================================
--- src/bp-templates/bp-legacy/buddypress/members/single/groups.php	(revision 11248)
+++ src/bp-templates/bp-legacy/buddypress/members/single/groups.php	(working copy)
@@ -14,27 +14,8 @@
 
 		<?php if ( !bp_is_current_action( 'invites' ) ) : ?>
 
-			<li id="groups-order-select" class="last filter">
+		<?php bp_get_template_part('common/filters/select-order-filters'); ?>
 
-				<label for="groups-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
-				<select id="groups-order-by">
-					<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
-					<option value="popular"><?php _e( 'Most Members', 'buddypress' ); ?></option>
-					<option value="newest"><?php _e( 'Newly Created', 'buddypress' ); ?></option>
-					<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
-
-					<?php
-
-					/**
-					 * Fires inside the members group order options select input.
-					 *
-					 * @since 1.2.0
-					 */
-					do_action( 'bp_member_group_order_options' ); ?>
-
-				</select>
-			</li>
-
 		<?php endif; ?>
 
 	</ul>
Index: src/bp-templates/bp-legacy/buddypress/members/single/notifications.php
===================================================================
--- src/bp-templates/bp-legacy/buddypress/members/single/notifications.php	(revision 11248)
+++ src/bp-templates/bp-legacy/buddypress/members/single/notifications.php	(working copy)
@@ -12,9 +12,7 @@
 	<ul>
 		<?php bp_get_options_nav(); ?>
 
-		<li id="members-order-select" class="last filter">
-			<?php bp_notifications_sort_order_form(); ?>
-		</li>
+		<?php bp_get_template_part('common/filters/select-order-filters'); ?>
 	</ul>
 </div>
 
