Index: /trunk/bp-activity/bp-activity-admin.php
===================================================================
--- /trunk/bp-activity/bp-activity-admin.php (revision 5436)
+++ /trunk/bp-activity/bp-activity-admin.php (revision 5437)
@@ -951,50 +951,44 @@
* Markup for the "filter" part of the form (i.e. which activity type to display)
*
+ * @global object $bp BuddyPress global settings
* @param string $which 'top' or 'bottom'
* @since 1.6
*/
function extra_tablenav( $which ) {
+ global $bp;
+
if ( 'bottom' == $which )
return;
+ $actions = array();
$selected = !empty( $_REQUEST['activity_type'] ) ? $_REQUEST['activity_type'] : '';
- ?>
+
+ // Walk through the registered actions, and build an array of actions/values.
+ foreach ( $bp->activity->actions as $action ) {
+ $action = array_values( (array) $action );
+
+ for ( $i = 0, $i_count = count( $action ); $i < $i_count; $i++ )
+ $actions[ $action[$i]['key'] ] = $action[$i]['value'];
+ }
+
+ // This was a mis-named activity type from before BP 1.6
+ unset( $actions['friends_register_activity_action'] );
+
+ // Sort array by the human-readable value
+ natsort( $actions );
+ ?>
'post-query-submit' ) ); ?>
-
+
activity->id, 'activity_update', __( 'Posted an update', 'buddypress' ) );
-
+ * @global object $bp BuddyPress global settings
+ * @since 1.6
+ */
+function bp_activity_register_activity_actions() {
+ global $bp;
+
+ bp_activity_set_action( $bp->activity->id, 'activity_update', __( 'Posted a status update', 'buddypress' ) );
+ bp_activity_set_action( $bp->activity->id, 'activity_comment', __( 'Replied to a status update', 'buddypress' ) );
+
+ do_action( 'bp_activity_register_activity_actions' );
+
+ // Backpat. Don't use this.
do_action( 'updates_register_activity_actions' );
}
-add_action( 'bp_register_activity_actions', 'updates_register_activity_actions' );
+add_action( 'bp_register_activity_actions', 'bp_activity_register_activity_actions' );
/******************************************************************************
Index: /trunk/bp-core/deprecated/1.6.php
===================================================================
--- /trunk/bp-core/deprecated/1.6.php (revision 5436)
+++ /trunk/bp-core/deprecated/1.6.php (revision 5437)
@@ -74,3 +74,14 @@
}
+/**
+ * Activity functions
+ */
+
+/**
+ * @deprecated 1.6
+ * @deprecated No longer used. Renamed to bp_activity_register_activity_actions().
+ */
+function updates_register_activity_actions() {
+ _deprecated_function( __FUNCTION__, '1.6' );
+}
?>
Index: /trunk/bp-friends/bp-friends-activity.php
===================================================================
--- /trunk/bp-friends/bp-friends-activity.php (revision 5436)
+++ /trunk/bp-friends/bp-friends-activity.php (revision 5437)
@@ -48,4 +48,9 @@
return false;
+ // These two added in BP 1.6
+ bp_activity_set_action( $bp->friends->id, 'friendship_accepted', __( 'Friendships accepted', 'buddypress' ) );
+ bp_activity_set_action( $bp->friends->id, 'friendship_created', __( 'New friendships', 'buddypress' ) );
+
+ // < BP 1.6 backpat
bp_activity_set_action( $bp->friends->id, 'friends_register_activity_action', __( 'New friendship created', 'buddypress' ) );
Index: /trunk/bp-xprofile/bp-xprofile-activity.php
===================================================================
--- /trunk/bp-xprofile/bp-xprofile-activity.php (revision 5436)
+++ /trunk/bp-xprofile/bp-xprofile-activity.php (revision 5437)
@@ -16,10 +16,8 @@
global $bp;
- if ( bp_is_active( 'activity' ) )
- return false;
-
// Register the activity stream actions for this component
+ bp_activity_set_action( $bp->profile->id, 'new_avatar', __( 'Member changed profile picture', 'buddypress' ) );
bp_activity_set_action( $bp->profile->id, 'new_member', __( 'New member registered', 'buddypress' ) );
- bp_activity_set_action( $bp->profile->id, 'updated_profile', __( 'Updated Profile', 'buddypress' ) );
+ bp_activity_set_action( $bp->profile->id, 'updated_profile', __( 'Updated Profile', 'buddypress' ) );
do_action( 'xprofile_register_activity_actions' );