Skip to:
Content

BuddyPress.org

Changeset 2287 for trunk/bp-xprofile.php


Ignore:
Timestamp:
01/10/2010 08:42:42 PM (17 years ago)
Author:
apeatling
Message:

Shifted the filter select from the main activity page tab row onto a second row to accommodate the missing feed link (links will be altered on an upcoming commit). Added a mentions tab. Tweaked a couple of css styles and ID's for better re-use.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile.php

    r2284 r2287  
    753753 */
    754754
    755 function xprofile_post_update( $args = '' ) {
    756         global $bp;
    757 
    758         $defaults = array(
    759                 'content' => false,
    760                 'user_id' => $bp->loggedin_user->id
    761         );
    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 
    792755/*** Field Group Management **************************************************/
    793756
Note: See TracChangeset for help on using the changeset viewer.