Skip to:
Content

BuddyPress.org

Changeset 4605


Ignore:
Timestamp:
07/04/2011 05:50:22 PM (13 years ago)
Author:
johnjamesjacoby
Message:

First pass at reverting members/core function & filter refactor. See #3158.

Location:
trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-notifications.php

    r4602 r4605  
    2929            continue;
    3030
    31         bp_members_add_notification( $activity_id, $receiver_user_id, 'activity', 'new_at_mention', $poster_user_id );
     31        bp_core_add_notification( $activity_id, $receiver_user_id, 'activity', 'new_at_mention', $poster_user_id );
    3232
    3333        $subject = '';
  • trunk/bp-activity/bp-activity-screens.php

    r4558 r4605  
    6363    global $bp;
    6464
    65     bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->activity->id, 'new_at_mention' );
     65    bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->activity->id, 'new_at_mention' );
    6666}
    6767add_action( 'bp_activity_screen_my_activity',               'bp_activity_remove_screen_notifications' );
  • trunk/bp-core/deprecated/1.3.php

    r4538 r4605  
    8484}
    8585
    86 /** Sign up *******************************************************************/
    87 
    88 function bp_core_screen_signup() {
    89     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_screen_signup' );
    90     bp_members_screen_signup();
    91 }
    92 
    93 function bp_core_screen_activation() {
    94     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_screen_activation' );
    95     bp_members_screen_activation();
    96 }
    97 
    98 function bp_core_flush_illegal_names() {
    99     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_flush_illegal_names' );
    100     bp_members_flush_illegal_names();
    101 }
    102 
    103 function bp_core_illegal_names( $value = '', $oldvalue = '' ) {
    104     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_illegal_names' );
    105     bp_members_illegal_names( $value, $oldvalue );
    106 }
    107 
    108 function bp_core_validate_user_signup( $user_name, $user_email ) {
    109     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_validate_user_signup' );
    110     bp_members_validate_user_signup( $user_name, $user_email );
    111 }
    112 
    113 function bp_core_validate_blog_signup( $blog_url, $blog_title ) {
    114     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_validate_blog_signup' );
    115     bp_members_validate_blog_signup( $blog_url, $blog_title );
    116 }
    117 
    118 function bp_core_signup_user( $user_login, $user_password, $user_email, $usermeta ) {
    119     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_signup_user' );
    120     bp_members_signup_user( $user_login, $user_password, $user_email, $usermeta );
    121 }
    122 
    123 function bp_core_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) {
    124     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_signup_blog' );
    125     bp_members_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta );
    126 }
    127 
    128 function bp_core_activate_signup( $key ) {
    129     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_activate_signup' );
    130     bp_members_activate_signup( $key );
    131 }
    132 
    133 function bp_core_new_user_activity( $user ) {
    134     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_new_user_activity' );
    135     bp_members_new_user_activity( $user );
    136 }
    137 
    138 function bp_core_map_user_registration( $user_id ) {
    139     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_map_user_registration' );
    140     bp_members_map_user_registration( $user_id );
    141 }
    142 
    143 function bp_core_signup_avatar_upload_dir() {
    144     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_signup_avatar_upload_dir' );
    145     bp_members_signup_avatar_upload_dir();
    146 }
    147 
    148 function bp_core_signup_send_validation_email( $user_id, $user_email, $key ) {
    149     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_signup_send_validation_email' );
    150     bp_members_signup_send_validation_email( $user_id, $user_email, $key );
    151 }
    152 
    153 function bp_core_signup_disable_inactive( $auth_obj, $username ) {
    154     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_signup_disable_inactive' );
    155     bp_members_signup_disable_inactive( $auth_obj, $username );
    156 }
    157 
    158 function bp_core_wpsignup_redirect() {
    159     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_wpsignup_redirect' );
    160     bp_members_wpsignup_redirect();
    161 }
    162 
    163 /** Settings ******************************************************************/
    164 
    165 function bp_core_add_settings_nav() {
    166     _deprecated_function( __FUNCTION__, '1.3', 'bp_settings_add_settings_nav' );
    167     bp_settings_add_settings_nav();
    168 }
    169 
    170 function bp_core_can_edit_settings() {
    171     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_can_edit_settings' );
    172     bp_members_can_edit_settings();
    173 }
    174 
    175 function bp_core_screen_general_settings() {
    176     _deprecated_function( __FUNCTION__, '1.3', 'bp_settings_screen_general_settings' );
    177     bp_settings_screen_general_settings();
    178 }
    179 
    180 function bp_core_screen_general_settings_title() {
    181     _deprecated_function( __FUNCTION__, '1.3', 'bp_settings_screen_general_settings' );
    182 }
    183 
    184 function bp_core_screen_general_settings_content() {
    185     _deprecated_function( __FUNCTION__, '1.3', 'bp_settings_screen_general_settings' );
    186 }
    187 
    188 function bp_core_screen_notification_settings() {
    189     _deprecated_function( __FUNCTION__, '1.3', 'bp_settings_screen_notification_settings' );
    190     bp_settings_screen_notification_settings();
    191 }
    192 
    193 function bp_core_screen_notification_settings_title() {
    194     _deprecated_function( __FUNCTION__, '1.3', 'bp_settings_screen_notification_settings' );
    195 }
    196 
    197 function bp_core_screen_notification_settings_content() {
    198     _deprecated_function( __FUNCTION__, '1.3', 'bp_settings_screen_notification_settings' );
    199 }
    200 
    201 function bp_core_screen_delete_account() {
    202     _deprecated_function( __FUNCTION__, '1.3', 'bp_settings_screen_delete_account' );
    203     bp_settings_screen_delete_account();
    204 }
    205 
    206 function bp_core_screen_delete_account_title() {
    207     _deprecated_function( __FUNCTION__, '1.3', 'bp_settings_screen_delete_account' );
    208 }
    209 
    210 function bp_core_screen_delete_account_content() {
    211     _deprecated_function( __FUNCTION__, '1.3', 'bp_settings_screen_delete_account' );
    212 }
    213 
    214 /** Notifications *************************************************************/
    215 
    216 function bp_core_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = false, $date_notified = false ) {
    217     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_add_notification' );
    218     bp_members_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id, $date_notified );
    219 }
    220 
    221 function bp_core_delete_notification( $id ) {
    222     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_delete_notification' );
    223     bp_members_delete_notification( $id );
    224 }
    225 
    226 function bp_core_get_notification( $id ) {
    227     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_get_notification' );
    228     bp_members_get_notification( $id );
    229 }
    230 
    231 function bp_core_get_notifications_for_user( $user_id ) {
    232     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_get_notifications_for_user' );
    233     bp_members_get_notifications_for_user( $user_id );
    234 }
    235 
    236 function bp_core_delete_notifications_by_type( $user_id, $component_name, $component_action ) {
    237     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_delete_notifications_by_type' );
    238     bp_members_delete_notifications_by_type( $user_id, $component_name, $component_action );
    239 }
    240 
    241 function bp_core_delete_notifications_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {
    242     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_delete_notifications_by_item_id' );
    243     bp_members_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id );
    244 }
    245 
    246 function bp_core_delete_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false ) {
    247     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_delete_all_notifications_by_type' );
    248     bp_members_delete_all_notifications_by_type( $item_id, $component_name, $component_action, $secondary_item_id );
    249 }
    250 
    251 function bp_core_delete_notifications_from_user( $user_id, $component_name, $component_action ) {
    252     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_delete_notifications_from_user' );
    253     bp_members_delete_notifications_from_user( $user_id, $component_name, $component_action );
    254 }
    255 
    256 function bp_core_check_notification_access( $user_id, $notification_id ) {
    257     _deprecated_function( __FUNCTION__, '1.3', 'bp_members_check_notification_access' );
    258     bp_members_check_notification_access( $user_id, $notification_id );
    259 }
    260 
    26186/** Core **********************************************************************/
    26287
  • trunk/bp-friends/bp-friends-cache.php

    r3917 r4605  
    2020
    2121    if ( isset( $_GET['new'] ) )
    22         bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->friends->id, 'friendship_accepted' );
     22        bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->friends->id, 'friendship_accepted' );
    2323}
    2424add_action( 'bp_activity_screen_my_activity', 'friends_clear_friend_notifications' );
  • trunk/bp-friends/bp-friends-functions.php

    r4558 r4605  
    3232        if ( !$force_accept ) {
    3333            // Add the on screen notification
    34             bp_members_add_notification( $friendship->initiator_user_id, $friendship->friend_user_id, $bp->friends->id, 'friendship_request' );
     34            bp_core_add_notification( $friendship->initiator_user_id, $friendship->friend_user_id, $bp->friends->id, 'friendship_request' );
    3535
    3636            // Send the email notification
     
    8080
    8181        // Remove the friend request notice
    82         bp_members_delete_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' );
     82        bp_core_delete_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' );
    8383
    8484        // Add a friend accepted notice for the initiating user
    85         bp_members_add_notification( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_accepted' );
     85        bp_core_add_notification( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_accepted' );
    8686
    8787        $initiator_link = bp_core_get_userlink( $friendship->initiator_user_id );
     
    126126    if ( !$friendship->is_confirmed && BP_Friends_Friendship::reject( $friendship_id ) ) {
    127127        // Remove the friend request notice
    128         bp_members_delete_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' );
     128        bp_core_delete_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id, $bp->friends->id, 'friendship_request' );
    129129
    130130        do_action_ref_array( 'friends_friendship_rejected', array( $friendship_id, &$friendship ) );
     
    279279
    280280    // Remove friendship requests FROM user
    281     bp_members_delete_notifications_from_user( $user_id, $bp->friends->id, 'friendship_request' );
     281    bp_core_delete_notifications_from_user( $user_id, $bp->friends->id, 'friendship_request' );
    282282
    283283    do_action( 'friends_remove_data', $user_id );
  • trunk/bp-friends/bp-friends-screens.php

    r4558 r4605  
    1111
    1212    // Delete any friendship acceptance notifications for the user when viewing a profile
    13     bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->friends->id, 'friendship_accepted' );
     13    bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->friends->id, 'friendship_accepted' );
    1414
    1515    do_action( 'friends_screen_my_friends' );
     
    4747
    4848    if ( isset( $_GET['new'] ) )
    49         bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->friends->id, 'friendship_request' );
     49        bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->friends->id, 'friendship_request' );
    5050
    5151    bp_core_load_template( apply_filters( 'friends_template_requests', 'members/single/home' ) );
  • trunk/bp-groups/bp-groups-functions.php

    r4604 r4605  
    198198
    199199    // Remove all notifications for any user belonging to this group
    200     bp_members_delete_all_notifications_by_type( $group_id, $bp->groups->slug );
     200    bp_core_delete_all_notifications_by_type( $group_id, $bp->groups->slug );
    201201
    202202    // Remove forum if component is active and current group has one
     
    591591    groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
    592592
    593     bp_members_delete_notifications_by_item_id( $user_id, $group_id, $bp->groups->id, 'group_invite' );
     593    bp_core_delete_notifications_by_item_id( $user_id, $group_id, $bp->groups->id, 'group_invite' );
    594594
    595595    do_action( 'groups_accept_invite', $user_id, $group_id );
     
    612612
    613613    if ( $delete )
    614         bp_members_delete_notifications_by_item_id( $user_id, $group_id, $bp->groups->id, 'group_invite' );
     614        bp_core_delete_notifications_by_item_id( $user_id, $group_id, $bp->groups->id, 'group_invite' );
    615615
    616616    return $delete;
  • trunk/bp-groups/bp-groups-notifications.php

    r4602 r4605  
    4646    global $bp;
    4747
    48     bp_members_add_notification( $requesting_user_id, $admin_id, 'groups', 'new_membership_request', $group_id );
     48    bp_core_add_notification( $requesting_user_id, $admin_id, 'groups', 'new_membership_request', $group_id );
    4949
    5050    if ( 'no' == bp_get_user_meta( $admin_id, 'notification_groups_membership_request', true ) )
     
    9696    // Post a screen notification first.
    9797    if ( $accepted )
    98         bp_members_add_notification( $group_id, $requesting_user_id, 'groups', 'membership_request_accepted' );
     98        bp_core_add_notification( $group_id, $requesting_user_id, 'groups', 'membership_request_accepted' );
    9999    else
    100         bp_members_add_notification( $group_id, $requesting_user_id, 'groups', 'membership_request_rejected' );
     100        bp_core_add_notification( $group_id, $requesting_user_id, 'groups', 'membership_request_rejected' );
    101101
    102102    if ( 'no' == bp_get_user_meta( $requesting_user_id, 'notification_membership_request_completed', true ) )
     
    159159
    160160    // Post a screen notification first.
    161     bp_members_add_notification( $group_id, $user_id, 'groups', $type );
     161    bp_core_add_notification( $group_id, $user_id, 'groups', $type );
    162162
    163163    if ( 'no' == bp_get_user_meta( $user_id, 'notification_groups_admin_promotion', true ) )
     
    209209
    210210        // Post a screen notification first.
    211         bp_members_add_notification( $group->id, $invited_user_id, 'groups', 'group_invite' );
     211        bp_core_add_notification( $group->id, $invited_user_id, 'groups', 'group_invite' );
    212212
    213213        if ( 'no' == bp_get_user_meta( $invited_user_id, 'notification_groups_invite', true ) )
  • trunk/bp-groups/bp-groups-screens.php

    r4558 r4605  
    2525    // Delete group request notifications for the user
    2626    if ( isset( $_GET['n'] ) ) {
    27         bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_accepted' );
    28         bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_rejected' );
    29         bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_mod'      );
    30         bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_admin'    );
     27        bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_accepted' );
     28        bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_rejected' );
     29        bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_mod'      );
     30        bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_admin'    );
    3131    }
    3232
     
    7979
    8080    // Remove notifications
    81     bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'group_invite' );
     81    bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'group_invite' );
    8282
    8383    do_action( 'groups_screen_group_invites', $group_id );
     
    9191    if ( bp_is_single_item() ) {
    9292        if ( isset( $_GET['n'] ) ) {
    93             bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_accepted' );
    94             bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_rejected' );
    95             bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_mod'      );
    96             bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_admin'    );
     93            bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_accepted' );
     94            bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'membership_request_rejected' );
     95            bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_mod'      );
     96            bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'member_promoted_to_admin'    );
    9797        }
    9898
     
    718718
    719719        // Remove any screen notifications
    720         bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'new_membership_request' );
     720        bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->groups->id, 'new_membership_request' );
    721721
    722722        $request_action = ( !empty( $bp->action_variables[1] ) ? $bp->action_variables[1] : '' );
  • trunk/bp-members/bp-members-buddybar.php

    r4602 r4605  
    1111    _e( 'Notifications', 'buddypress' );
    1212
    13     if ( $notifications = bp_members_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
     13    if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
    1414        <span><?php echo count( $notifications ) ?></span>
    1515    <?php
  • trunk/bp-members/bp-members-functions.php

    r4596 r4605  
    691691add_action( 'bp_make_spam_user', 'bp_core_remove_data' );
    692692
    693 function bp_members_can_edit_settings() {
     693function bp_core_can_edit_settings() {
    694694    if ( bp_is_my_profile() )
    695695        return true;
  • trunk/bp-members/bp-members-notifications.php

    r4246 r4605  
    1010 */
    1111
    12 function bp_members_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = 0, $date_notified = false ) {
     12function bp_core_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = 0, $date_notified = false ) {
    1313    global $bp;
    1414
     
    3333}
    3434
    35 function bp_members_delete_notification( $id ) {
    36     if ( !bp_members_check_notification_access( $bp->loggedin_user->id, $id ) )
     35function bp_core_delete_notification( $id ) {
     36    if ( !bp_core_check_notification_access( $bp->loggedin_user->id, $id ) )
    3737        return false;
    3838
     
    4040}
    4141
    42 function bp_members_get_notification( $id ) {
     42function bp_core_get_notification( $id ) {
    4343    return new BP_Core_Notification( $id );
    4444}
    4545
    46 function bp_members_get_notifications_for_user( $user_id ) {
     46function bp_core_get_notifications_for_user( $user_id ) {
    4747    global $bp;
    4848
     
    8181}
    8282
    83 function bp_members_delete_notifications_by_type( $user_id, $component_name, $component_action ) {
     83function bp_core_delete_notifications_by_type( $user_id, $component_name, $component_action ) {
    8484    return BP_Core_Notification::delete_for_user_by_type( $user_id, $component_name, $component_action );
    8585}
    8686
    87 function bp_members_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {
     87function bp_core_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {
    8888    return BP_Core_Notification::delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id );
    8989}
    9090
    91 function bp_members_delete_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false ) {
     91function bp_core_delete_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false ) {
    9292    return BP_Core_Notification::delete_all_by_type( $item_id, $component_name, $component_action, $secondary_item_id );
    9393}
    9494
    95 function bp_members_delete_notifications_from_user( $user_id, $component_name, $component_action ) {
     95function bp_core_delete_notifications_from_user( $user_id, $component_name, $component_action ) {
    9696    return BP_Core_Notification::delete_from_user_by_type( $user_id, $component_name, $component_action );
    9797}
    9898
    99 function bp_members_check_notification_access( $user_id, $notification_id ) {
     99function bp_core_check_notification_access( $user_id, $notification_id ) {
    100100    if ( !BP_Core_Notification::check_access( $user_id, $notification_id ) )
    101101        return false;
  • trunk/bp-members/bp-members-signup.php

    r4414 r4605  
    1111
    1212
    13 function bp_members_screen_signup() {
     13function bp_core_screen_signup() {
    1414    global $bp, $wpdb;
    1515
     
    4343
    4444        // Check the base account details for problems
    45         $account_details = bp_members_validate_user_signup( $_POST['signup_username'], $_POST['signup_email'] );
     45        $account_details = bp_core_validate_user_signup( $_POST['signup_username'], $_POST['signup_email'] );
    4646
    4747        // If there are errors with account details, set them for display
     
    9595
    9696            if ( 'blog' == $active_signup || 'all' == $active_signup ) {
    97                 $blog_details = bp_members_validate_blog_signup( $_POST['signup_blog_url'], $_POST['signup_blog_title'] );
     97                $blog_details = bp_core_validate_blog_signup( $_POST['signup_blog_url'], $_POST['signup_blog_title'] );
    9898
    9999                // If there are errors with blog details, set them for display
     
    148148                // Finally, sign up the user and/or blog
    149149                if ( isset( $_POST['signup_with_blog'] ) && is_multisite() )
    150                     bp_members_signup_blog( $blog_details['domain'], $blog_details['path'], $blog_details['blog_title'], $_POST['signup_username'], $_POST['signup_email'], $usermeta );
     150                    bp_core_signup_blog( $blog_details['domain'], $blog_details['path'], $blog_details['blog_title'], $_POST['signup_username'], $_POST['signup_email'], $usermeta );
    151151                else
    152                     bp_members_signup_user( $_POST['signup_username'], $_POST['signup_password'], $_POST['signup_email'], $usermeta );
     152                    bp_core_signup_user( $_POST['signup_username'], $_POST['signup_password'], $_POST['signup_email'], $usermeta );
    153153
    154154                $bp->signup->step = 'completed-confirmation';
     
    163163    bp_core_load_template( apply_filters( 'bp_members_template_register', 'registration/register' ) );
    164164}
    165 add_action( 'bp_screens', 'bp_members_screen_signup' );
    166 
    167 function bp_members_screen_activation() {
     165add_action( 'bp_screens', 'bp_core_screen_signup' );
     166
     167function bp_core_screen_activation() {
    168168    global $bp, $wpdb;
    169169
     
    175175
    176176        // Activate the signup
    177         $user = apply_filters( 'bp_members_activate_account', bp_members_activate_signup( $_GET['key'] ) );
     177        $user = apply_filters( 'bp_members_activate_account', bp_core_activate_signup( $_GET['key'] ) );
    178178
    179179        // If there were errors, add a message and redirect
     
    204204        bp_core_load_template( apply_filters( 'bp_core_template_activate', 'registration/activate' ) );
    205205}
    206 add_action( 'bp_screens', 'bp_members_screen_activation' );
     206add_action( 'bp_screens', 'bp_core_screen_activation' );
    207207
    208208
     
    219219 * Flush illegal names by getting and setting 'illegal_names' site option
    220220 */
    221 function bp_members_flush_illegal_names() {
     221function bp_core_flush_illegal_names() {
    222222    $illegal_names = get_site_option( 'illegal_names' );
    223223    update_site_option( 'illegal_names', $illegal_names );
     
    232232 * @return array Merged and unique array of illegal names
    233233 */
    234 function bp_members_illegal_names( $value = '', $oldvalue = '' ) {
     234function bp_core_illegal_names( $value = '', $oldvalue = '' ) {
    235235
    236236    // Make sure $value is array
     
    284284    $illegal_names          = array_unique( (array)$merged_names );
    285285
    286     return apply_filters( 'bp_members_illegal_names', $illegal_names );
    287 }
    288 add_filter( 'pre_update_site_option_illegal_names', 'bp_members_illegal_names', 10, 2 );
     286    return apply_filters( 'bp_core_illegal_names', $illegal_names );
     287}
     288add_filter( 'pre_update_site_option_illegal_names', 'bp_core_illegal_names', 10, 2 );
    289289
    290290/**
     
    296296 * @return array Results of user validation including errors, if any
    297297 */
    298 function bp_members_validate_user_signup( $user_name, $user_email ) {
     298function bp_core_validate_user_signup( $user_name, $user_email ) {
    299299    global $wpdb;
    300300
     
    309309
    310310    // Make sure illegal names include BuddyPress slugs and values
    311     bp_members_flush_illegal_names();
     311    bp_core_flush_illegal_names();
    312312
    313313    $illegal_names = get_site_option( 'illegal_names' );
     
    357357    $result = apply_filters( 'wpmu_validate_user_signup', $result );
    358358
    359     return apply_filters( 'bp_members_validate_user_signup', $result );
    360 }
    361 
    362 function bp_members_validate_blog_signup( $blog_url, $blog_title ) {
     359    return apply_filters( 'bp_core_validate_user_signup', $result );
     360}
     361
     362function bp_core_validate_blog_signup( $blog_url, $blog_title ) {
    363363    if ( !is_multisite() || !function_exists( 'wpmu_validate_blog_signup' ) )
    364364        return false;
    365365
    366     return apply_filters( 'bp_members_validate_blog_signup', wpmu_validate_blog_signup( $blog_url, $blog_title ) );
    367 }
    368 
    369 function bp_members_signup_user( $user_login, $user_password, $user_email, $usermeta ) {
     366    return apply_filters( 'bp_core_validate_blog_signup', wpmu_validate_blog_signup( $blog_url, $blog_title ) );
     367}
     368
     369function bp_core_signup_user( $user_login, $user_password, $user_email, $usermeta ) {
    370370    global $bp, $wpdb;
    371371
     
    423423            $activation_key = wp_hash( $user_id );
    424424            update_user_meta( $user_id, 'activation_key', $activation_key );
    425             bp_members_signup_send_validation_email( $user_id, $user_email, $activation_key );
    426         }
    427     }
    428 
    429     do_action( 'bp_members_signup_user', $user_id, $user_login, $user_password, $user_email, $usermeta );
     425            bp_core_signup_send_validation_email( $user_id, $user_email, $activation_key );
     426        }
     427    }
     428
     429    do_action( 'bp_core_signup_user', $user_id, $user_login, $user_password, $user_email, $usermeta );
    430430
    431431    return $user_id;
    432432}
    433433
    434 function bp_members_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) {
     434function bp_core_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) {
    435435    if ( !is_multisite() || !function_exists( 'wpmu_signup_blog' ) )
    436436        return false;
    437437
    438     return apply_filters( 'bp_members_signup_blog', wpmu_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) );
    439 }
    440 
    441 function bp_members_activate_signup( $key ) {
     438    return apply_filters( 'bp_core_signup_blog', wpmu_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) );
     439}
     440
     441function bp_core_activate_signup( $key ) {
    442442    global $bp, $wpdb;
    443443
     
    502502}
    503503
    504 function bp_members_new_user_activity( $user ) {
     504function bp_core_new_user_activity( $user ) {
    505505    if ( empty( $user ) || !bp_is_active( 'activity' ) )
    506506        return false;
     
    523523    ) );
    524524}
    525 add_action( 'bp_members_activated_user', 'bp_members_new_user_activity' );
    526 
    527 function bp_members_map_user_registration( $user_id ) {
     525add_action( 'bp_members_activated_user', 'bp_core_new_user_activity' );
     526
     527function bp_core_map_user_registration( $user_id ) {
    528528    // Only map data when the site admin is adding users, not on registration.
    529529    if ( !is_admin() )
     
    542542    }
    543543}
    544 add_action( 'user_register', 'bp_members_map_user_registration' );
    545 
    546 function bp_members_signup_avatar_upload_dir() {
     544add_action( 'user_register', 'bp_core_map_user_registration' );
     545
     546function bp_core_signup_avatar_upload_dir() {
    547547    global $bp;
    548548
     
    560560    $newsubdir = '/avatars/signups/' . $bp->signup->avatar_dir;
    561561
    562     return apply_filters( 'bp_members_signup_avatar_upload_dir', array( 'path' => $path, 'url' => $newurl, 'subdir' => $newsubdir, 'basedir' => $newbdir, 'baseurl' => $newburl, 'error' => false ) );
    563 }
    564 
    565 function bp_members_signup_send_validation_email( $user_id, $user_email, $key ) {
     562    return apply_filters( 'bp_core_signup_avatar_upload_dir', array( 'path' => $path, 'url' => $newurl, 'subdir' => $newsubdir, 'basedir' => $newbdir, 'baseurl' => $newburl, 'error' => false ) );
     563}
     564
     565function bp_core_signup_send_validation_email( $user_id, $user_email, $key ) {
    566566    $activate_url = bp_get_activation_page() ."?key=$key";
    567567    $activate_url = esc_url( $activate_url );
     
    573573
    574574    // Send the message
    575     $to      = apply_filters( 'bp_members_signup_send_validation_email_to',     $user_email, $user_id                );
    576     $subject = apply_filters( 'bp_members_signup_send_validation_email_subject', $subject,    $user_id                );
    577     $message = apply_filters( 'bp_members_signup_send_validation_email_message', $message,    $user_id, $activate_url );
     575    $to      = apply_filters( 'bp_core_signup_send_validation_email_to',     $user_email, $user_id                );
     576    $subject = apply_filters( 'bp_core_signup_send_validation_email_subject', $subject,    $user_id                );
     577    $message = apply_filters( 'bp_core_signup_send_validation_email_message', $message,    $user_id, $activate_url );
    578578
    579579    wp_mail( $to, $subject, $message );
     
    583583
    584584// Stop user accounts logging in that have not been activated (user_status = 2)
    585 function bp_members_signup_disable_inactive( $auth_obj, $username ) {
     585function bp_core_signup_disable_inactive( $auth_obj, $username ) {
    586586    global $bp, $wpdb;
    587587
     
    596596        return $auth_obj;
    597597}
    598 add_filter( 'authenticate', 'bp_members_signup_disable_inactive', 30, 2 );
     598add_filter( 'authenticate', 'bp_core_signup_disable_inactive', 30, 2 );
    599599
    600600// Kill the wp-signup.php if custom registration signup templates are present
    601 function bp_members_wpsignup_redirect() {
     601function bp_core_wpsignup_redirect() {
    602602    global $bp;
    603603
     
    613613        bp_core_redirect( trailingslashit( bp_get_root_domain() . '/' . $bp->pages->register->slug ) );
    614614}
    615 add_action( 'bp_screens', 'bp_members_wpsignup_redirect' );
     615add_action( 'bp_screens', 'bp_core_wpsignup_redirect' );
    616616
    617617?>
  • trunk/bp-messages/bp-messages-functions.php

    r4397 r4605  
    9898        // Send screen notifications to the recipients
    9999        foreach ( (array)$message->recipients as $recipient )
    100             bp_members_add_notification( $message->id, $recipient->user_id, 'messages', 'new_message' );
     100            bp_core_add_notification( $message->id, $recipient->user_id, 'messages', 'new_message' );
    101101
    102102        // Send email notifications to the recipients
  • trunk/bp-messages/bp-messages-template.php

    r4558 r4605  
    173173    } else {
    174174        if ( 'inbox' == $bp->current_action )
    175             bp_members_delete_notifications_by_type( $bp->loggedin_user->id, $bp->messages->id, 'new_message' );
     175            bp_core_delete_notifications_by_type( $bp->loggedin_user->id, $bp->messages->id, 'new_message' );
    176176
    177177        if ( 'sentbox' == $bp->current_action )
  • trunk/bp-settings/bp-settings-actions.php

    r4558 r4605  
    22/** General *******************************************************************/
    33
    4 function bp_settings_screen_general_settings() {
     4function bp_core_screen_general_settings() {
    55    global $bp;
    66
     
    112112/** Notifications *************************************************************/
    113113
    114 function bp_settings_screen_notification_settings() {
     114function bp_core_screen_notification_settings() {
    115115    global $bp;
    116116
     
    140140/** Delete Account ************************************************************/
    141141
    142 function bp_settings_screen_delete_account() {
     142function bp_core_screen_delete_account() {
    143143    global $bp;
    144144
  • trunk/bp-settings/bp-settings-loader.php

    r4381 r4605  
    7474            'slug'                    => $this->slug,
    7575            'position'                => 100,
    76             'show_for_displayed_user' => bp_members_can_edit_settings(),
    77             'screen_function'         => 'bp_settings_screen_general_settings',
     76            'show_for_displayed_user' => bp_core_can_edit_settings(),
     77            'screen_function'         => 'bp_core_screen_general_settings',
    7878            'default_subnav_slug'     => 'general'
    7979        );
     
    8787            'parent_url'      => $settings_link,
    8888            'parent_slug'     => $this->slug,
    89             'screen_function' => 'bp_settings_screen_general_settings',
     89            'screen_function' => 'bp_core_screen_general_settings',
    9090            'position'        => 10,
    91             'user_has_access' => bp_members_can_edit_settings()
     91            'user_has_access' => bp_core_can_edit_settings()
    9292        );
    9393
     
    9898            'parent_url'      => $settings_link,
    9999            'parent_slug'     => $this->slug,
    100             'screen_function' => 'bp_settings_screen_notification_settings',
     100            'screen_function' => 'bp_core_screen_notification_settings',
    101101            'position'        => 20,
    102             'user_has_access' => bp_members_can_edit_settings()
     102            'user_has_access' => bp_core_can_edit_settings()
    103103        );
    104104
     
    110110                'parent_url'      => $settings_link,
    111111                'parent_slug'     => $this->slug,
    112                 'screen_function' => 'bp_settings_screen_delete_account',
     112                'screen_function' => 'bp_core_screen_delete_account',
    113113                'position'        => 90,
    114114                'user_has_access' => bp_is_my_profile()
Note: See TracChangeset for help on using the changeset viewer.