Changeset 8807
- Timestamp:
- 08/12/2014 12:27:49 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-xprofile/bp-xprofile-activity.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-activity.php
r8806 r8807 116 116 * it will show in the users activity stream (if installed) 117 117 * 118 * @since BuddyPress (1.0.0)0 119 * 118 120 * @package BuddyPress 119 121 * @subpackage XProfileActivity 120 122 * @param string $args String containing all variables used after extract() call 121 * @global $bp The global BuddyPress settings variable created in bp_core_current_times()122 123 * @uses bp_activity_add() Adds an entry to the activity component tables for a specific activity 123 124 */ 124 125 function xprofile_record_activity( $args = '' ) { 125 126 126 if ( !bp_is_active( 'activity' ) ) 127 return false; 128 129 global $bp; 130 131 $defaults = array ( 127 // Bail if activity component is not active 128 if ( ! bp_is_active( 'activity' ) ) { 129 return false; 130 } 131 132 // Parse the arguments 133 $r = bp_parse_args( $args, array( 132 134 'user_id' => bp_loggedin_user_id(), 133 135 'action' => '', 134 136 'content' => '', 135 137 'primary_link' => '', 136 'component' => $bp->profile->id,138 'component' => buddypress()->profile->id, 137 139 'type' => false, 138 140 'item_id' => false, … … 140 142 'recorded_time' => bp_core_current_time(), 141 143 'hide_sitewide' => false 142 );143 144 $r = wp_parse_args( $args, $defaults );145 extract( $r, EXTR_SKIP );146 147 return bp_activity_add( array(148 'user_id' => $user_id,149 'action' => $action,150 'content' => $content,151 'primary_link' => $primary_link,152 'component' => $component,153 'type' => $type,154 'item_id' => $item_id,155 'secondary_item_id' => $secondary_item_id,156 'recorded_time' => $recorded_time,157 'hide_sitewide' => $hide_sitewide158 144 ) ); 145 146 return bp_activity_add( $r ); 159 147 } 160 148
Note:
See TracChangeset
for help on using the changeset viewer.