Changeset 2287 for trunk/bp-xprofile.php
- Timestamp:
- 01/10/2010 08:42:42 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile.php
r2284 r2287 753 753 */ 754 754 755 function xprofile_post_update( $args = '' ) {756 global $bp;757 758 $defaults = array(759 'content' => false,760 'user_id' => $bp->loggedin_user->id761 );762 763 $r = wp_parse_args( $args, $defaults );764 extract( $r, EXTR_SKIP );765 766 if ( empty($content) || empty($content) )767 return false;768 769 /* Record this on the user's profile */770 $from_user_link = bp_core_get_userlink( $user_id );771 $activity_content = sprintf( __('%s posted an update:', 'buddypress'), $from_user_link );772 $activity_content .= '<div class="activity-inner">' . $content . '</div>';773 774 $primary_link = bp_core_get_userlink( $user_id, false, true );775 776 /* Now write the values */777 $activity_id = xprofile_record_activity( array(778 'user_id' => $user_id,779 'content' => apply_filters( 'xprofile_activity_new_update_content', $activity_content ),780 'primary_link' => apply_filters( 'xprofile_activity_new_update_primary_link', $primary_link ),781 'component_action' => 'new_wire_post'782 ) );783 784 /* Add this update to the "latest update" usermeta so it can be fetched anywhere. */785 update_usermeta( $bp->loggedin_user->id, 'bp_latest_update', array( 'id' => $activity_id, 'content' => wp_filter_kses( $content ) ) );786 787 do_action( 'xprofile_posted_update', $content, $user_id, $activity_id );788 789 return $activity_id;790 }791 792 755 /*** Field Group Management **************************************************/ 793 756
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)