Skip to:
Content

BuddyPress.org

Changeset 1749 for trunk/bp-xprofile.php


Ignore:
Timestamp:
09/01/2009 01:45:37 AM (17 years ago)
Author:
apeatling
Message:

Centrally registered activity actions in $bp->activity->actions. This will be used to add privacy support to activity feeds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile.php

    r1739 r1749  
    88require ( BP_PLUGIN_DIR . '/bp-xprofile/bp-xprofile-classes.php' );
    99require ( BP_PLUGIN_DIR . '/bp-xprofile/bp-xprofile-filters.php' );
    10 require ( BP_PLUGIN_DIR . '/bp-xprofile/bp-xprofile-signup.php' );
    1110require ( BP_PLUGIN_DIR . '/bp-xprofile/bp-xprofile-templatetags.php' );
    1211require ( BP_PLUGIN_DIR . '/bp-xprofile/bp-xprofile-notifications.php' );
     
    142141        $bp->profile->slug = BP_XPROFILE_SLUG;
    143142
     143        /* Register the activity stream actions for this component */
     144        xprofile_register_activity_action( 'new_wire_post', __( 'New profile wire post', 'buddypress' ) );
     145
    144146        /* Register this in the active components array */
    145147        $bp->active_components[$bp->profile->slug] = $bp->profile->id;
    146 
     148       
     149        /* Set the support field type ids */
    147150        $bp->profile->field_types = apply_filters( 'xprofile_field_types', array( 'textbox', 'textarea', 'radio', 'checkbox', 'selectbox', 'multiselectbox', 'datebox' ) );
    148151
    149         if ( function_exists('bp_wire_install') )
     152        if ( function_exists( 'bp_wire_install' ) )
    150153                $bp->profile->table_name_wire = $wpdb->base_prefix . 'bp_xprofile_wire';
    151154}
     
    630633}
    631634
     635function xprofile_register_activity_action( $key, $value ) {
     636        global $bp;
     637       
     638        if ( !function_exists( 'bp_activity_set_action' ) )
     639                return false;
     640       
     641        return apply_filters( 'xprofile_register_activity_action', bp_activity_set_action( $bp->profile->id, $key, $value ), $key, $value );
     642}
     643
    632644/**
    633645 * xprofile_format_notifications()
Note: See TracChangeset for help on using the changeset viewer.