Changeset 4605
- Timestamp:
- 07/04/2011 05:50:22 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-notifications.php
r4602 r4605 29 29 continue; 30 30 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 ); 32 32 33 33 $subject = ''; -
trunk/bp-activity/bp-activity-screens.php
r4558 r4605 63 63 global $bp; 64 64 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' ); 66 66 } 67 67 add_action( 'bp_activity_screen_my_activity', 'bp_activity_remove_screen_notifications' ); -
trunk/bp-core/deprecated/1.3.php
r4538 r4605 84 84 } 85 85 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 261 86 /** Core **********************************************************************/ 262 87 -
trunk/bp-friends/bp-friends-cache.php
r3917 r4605 20 20 21 21 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' ); 23 23 } 24 24 add_action( 'bp_activity_screen_my_activity', 'friends_clear_friend_notifications' ); -
trunk/bp-friends/bp-friends-functions.php
r4558 r4605 32 32 if ( !$force_accept ) { 33 33 // 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' ); 35 35 36 36 // Send the email notification … … 80 80 81 81 // 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' ); 83 83 84 84 // 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' ); 86 86 87 87 $initiator_link = bp_core_get_userlink( $friendship->initiator_user_id ); … … 126 126 if ( !$friendship->is_confirmed && BP_Friends_Friendship::reject( $friendship_id ) ) { 127 127 // 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' ); 129 129 130 130 do_action_ref_array( 'friends_friendship_rejected', array( $friendship_id, &$friendship ) ); … … 279 279 280 280 // 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' ); 282 282 283 283 do_action( 'friends_remove_data', $user_id ); -
trunk/bp-friends/bp-friends-screens.php
r4558 r4605 11 11 12 12 // 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' ); 14 14 15 15 do_action( 'friends_screen_my_friends' ); … … 47 47 48 48 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' ); 50 50 51 51 bp_core_load_template( apply_filters( 'friends_template_requests', 'members/single/home' ) ); -
trunk/bp-groups/bp-groups-functions.php
r4604 r4605 198 198 199 199 // 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 ); 201 201 202 202 // Remove forum if component is active and current group has one … … 591 591 groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() ); 592 592 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' ); 594 594 595 595 do_action( 'groups_accept_invite', $user_id, $group_id ); … … 612 612 613 613 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' ); 615 615 616 616 return $delete; -
trunk/bp-groups/bp-groups-notifications.php
r4602 r4605 46 46 global $bp; 47 47 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 ); 49 49 50 50 if ( 'no' == bp_get_user_meta( $admin_id, 'notification_groups_membership_request', true ) ) … … 96 96 // Post a screen notification first. 97 97 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' ); 99 99 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' ); 101 101 102 102 if ( 'no' == bp_get_user_meta( $requesting_user_id, 'notification_membership_request_completed', true ) ) … … 159 159 160 160 // 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 ); 162 162 163 163 if ( 'no' == bp_get_user_meta( $user_id, 'notification_groups_admin_promotion', true ) ) … … 209 209 210 210 // 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' ); 212 212 213 213 if ( 'no' == bp_get_user_meta( $invited_user_id, 'notification_groups_invite', true ) ) -
trunk/bp-groups/bp-groups-screens.php
r4558 r4605 25 25 // Delete group request notifications for the user 26 26 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' ); 31 31 } 32 32 … … 79 79 80 80 // 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' ); 82 82 83 83 do_action( 'groups_screen_group_invites', $group_id ); … … 91 91 if ( bp_is_single_item() ) { 92 92 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' ); 97 97 } 98 98 … … 718 718 719 719 // 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' ); 721 721 722 722 $request_action = ( !empty( $bp->action_variables[1] ) ? $bp->action_variables[1] : '' ); -
trunk/bp-members/bp-members-buddybar.php
r4602 r4605 11 11 _e( 'Notifications', 'buddypress' ); 12 12 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 ) ) { ?> 14 14 <span><?php echo count( $notifications ) ?></span> 15 15 <?php -
trunk/bp-members/bp-members-functions.php
r4596 r4605 691 691 add_action( 'bp_make_spam_user', 'bp_core_remove_data' ); 692 692 693 function bp_ members_can_edit_settings() {693 function bp_core_can_edit_settings() { 694 694 if ( bp_is_my_profile() ) 695 695 return true; -
trunk/bp-members/bp-members-notifications.php
r4246 r4605 10 10 */ 11 11 12 function bp_ members_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = 0, $date_notified = false ) {12 function bp_core_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = 0, $date_notified = false ) { 13 13 global $bp; 14 14 … … 33 33 } 34 34 35 function bp_ members_delete_notification( $id ) {36 if ( !bp_ members_check_notification_access( $bp->loggedin_user->id, $id ) )35 function bp_core_delete_notification( $id ) { 36 if ( !bp_core_check_notification_access( $bp->loggedin_user->id, $id ) ) 37 37 return false; 38 38 … … 40 40 } 41 41 42 function bp_ members_get_notification( $id ) {42 function bp_core_get_notification( $id ) { 43 43 return new BP_Core_Notification( $id ); 44 44 } 45 45 46 function bp_ members_get_notifications_for_user( $user_id ) {46 function bp_core_get_notifications_for_user( $user_id ) { 47 47 global $bp; 48 48 … … 81 81 } 82 82 83 function bp_ members_delete_notifications_by_type( $user_id, $component_name, $component_action ) {83 function bp_core_delete_notifications_by_type( $user_id, $component_name, $component_action ) { 84 84 return BP_Core_Notification::delete_for_user_by_type( $user_id, $component_name, $component_action ); 85 85 } 86 86 87 function bp_ members_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {87 function bp_core_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) { 88 88 return BP_Core_Notification::delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id ); 89 89 } 90 90 91 function bp_ members_delete_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false ) {91 function bp_core_delete_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false ) { 92 92 return BP_Core_Notification::delete_all_by_type( $item_id, $component_name, $component_action, $secondary_item_id ); 93 93 } 94 94 95 function bp_ members_delete_notifications_from_user( $user_id, $component_name, $component_action ) {95 function bp_core_delete_notifications_from_user( $user_id, $component_name, $component_action ) { 96 96 return BP_Core_Notification::delete_from_user_by_type( $user_id, $component_name, $component_action ); 97 97 } 98 98 99 function bp_ members_check_notification_access( $user_id, $notification_id ) {99 function bp_core_check_notification_access( $user_id, $notification_id ) { 100 100 if ( !BP_Core_Notification::check_access( $user_id, $notification_id ) ) 101 101 return false; -
trunk/bp-members/bp-members-signup.php
r4414 r4605 11 11 12 12 13 function bp_ members_screen_signup() {13 function bp_core_screen_signup() { 14 14 global $bp, $wpdb; 15 15 … … 43 43 44 44 // 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'] ); 46 46 47 47 // If there are errors with account details, set them for display … … 95 95 96 96 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'] ); 98 98 99 99 // If there are errors with blog details, set them for display … … 148 148 // Finally, sign up the user and/or blog 149 149 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 ); 151 151 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 ); 153 153 154 154 $bp->signup->step = 'completed-confirmation'; … … 163 163 bp_core_load_template( apply_filters( 'bp_members_template_register', 'registration/register' ) ); 164 164 } 165 add_action( 'bp_screens', 'bp_ members_screen_signup' );166 167 function bp_ members_screen_activation() {165 add_action( 'bp_screens', 'bp_core_screen_signup' ); 166 167 function bp_core_screen_activation() { 168 168 global $bp, $wpdb; 169 169 … … 175 175 176 176 // 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'] ) ); 178 178 179 179 // If there were errors, add a message and redirect … … 204 204 bp_core_load_template( apply_filters( 'bp_core_template_activate', 'registration/activate' ) ); 205 205 } 206 add_action( 'bp_screens', 'bp_ members_screen_activation' );206 add_action( 'bp_screens', 'bp_core_screen_activation' ); 207 207 208 208 … … 219 219 * Flush illegal names by getting and setting 'illegal_names' site option 220 220 */ 221 function bp_ members_flush_illegal_names() {221 function bp_core_flush_illegal_names() { 222 222 $illegal_names = get_site_option( 'illegal_names' ); 223 223 update_site_option( 'illegal_names', $illegal_names ); … … 232 232 * @return array Merged and unique array of illegal names 233 233 */ 234 function bp_ members_illegal_names( $value = '', $oldvalue = '' ) {234 function bp_core_illegal_names( $value = '', $oldvalue = '' ) { 235 235 236 236 // Make sure $value is array … … 284 284 $illegal_names = array_unique( (array)$merged_names ); 285 285 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 } 288 add_filter( 'pre_update_site_option_illegal_names', 'bp_core_illegal_names', 10, 2 ); 289 289 290 290 /** … … 296 296 * @return array Results of user validation including errors, if any 297 297 */ 298 function bp_ members_validate_user_signup( $user_name, $user_email ) {298 function bp_core_validate_user_signup( $user_name, $user_email ) { 299 299 global $wpdb; 300 300 … … 309 309 310 310 // Make sure illegal names include BuddyPress slugs and values 311 bp_ members_flush_illegal_names();311 bp_core_flush_illegal_names(); 312 312 313 313 $illegal_names = get_site_option( 'illegal_names' ); … … 357 357 $result = apply_filters( 'wpmu_validate_user_signup', $result ); 358 358 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 362 function bp_core_validate_blog_signup( $blog_url, $blog_title ) { 363 363 if ( !is_multisite() || !function_exists( 'wpmu_validate_blog_signup' ) ) 364 364 return false; 365 365 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 369 function bp_core_signup_user( $user_login, $user_password, $user_email, $usermeta ) { 370 370 global $bp, $wpdb; 371 371 … … 423 423 $activation_key = wp_hash( $user_id ); 424 424 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 ); 430 430 431 431 return $user_id; 432 432 } 433 433 434 function bp_ members_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) {434 function bp_core_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) { 435 435 if ( !is_multisite() || !function_exists( 'wpmu_signup_blog' ) ) 436 436 return false; 437 437 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 441 function bp_core_activate_signup( $key ) { 442 442 global $bp, $wpdb; 443 443 … … 502 502 } 503 503 504 function bp_ members_new_user_activity( $user ) {504 function bp_core_new_user_activity( $user ) { 505 505 if ( empty( $user ) || !bp_is_active( 'activity' ) ) 506 506 return false; … … 523 523 ) ); 524 524 } 525 add_action( 'bp_members_activated_user', 'bp_ members_new_user_activity' );526 527 function bp_ members_map_user_registration( $user_id ) {525 add_action( 'bp_members_activated_user', 'bp_core_new_user_activity' ); 526 527 function bp_core_map_user_registration( $user_id ) { 528 528 // Only map data when the site admin is adding users, not on registration. 529 529 if ( !is_admin() ) … … 542 542 } 543 543 } 544 add_action( 'user_register', 'bp_ members_map_user_registration' );545 546 function bp_ members_signup_avatar_upload_dir() {544 add_action( 'user_register', 'bp_core_map_user_registration' ); 545 546 function bp_core_signup_avatar_upload_dir() { 547 547 global $bp; 548 548 … … 560 560 $newsubdir = '/avatars/signups/' . $bp->signup->avatar_dir; 561 561 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 565 function bp_core_signup_send_validation_email( $user_id, $user_email, $key ) { 566 566 $activate_url = bp_get_activation_page() ."?key=$key"; 567 567 $activate_url = esc_url( $activate_url ); … … 573 573 574 574 // 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 ); 578 578 579 579 wp_mail( $to, $subject, $message ); … … 583 583 584 584 // Stop user accounts logging in that have not been activated (user_status = 2) 585 function bp_ members_signup_disable_inactive( $auth_obj, $username ) {585 function bp_core_signup_disable_inactive( $auth_obj, $username ) { 586 586 global $bp, $wpdb; 587 587 … … 596 596 return $auth_obj; 597 597 } 598 add_filter( 'authenticate', 'bp_ members_signup_disable_inactive', 30, 2 );598 add_filter( 'authenticate', 'bp_core_signup_disable_inactive', 30, 2 ); 599 599 600 600 // Kill the wp-signup.php if custom registration signup templates are present 601 function bp_ members_wpsignup_redirect() {601 function bp_core_wpsignup_redirect() { 602 602 global $bp; 603 603 … … 613 613 bp_core_redirect( trailingslashit( bp_get_root_domain() . '/' . $bp->pages->register->slug ) ); 614 614 } 615 add_action( 'bp_screens', 'bp_ members_wpsignup_redirect' );615 add_action( 'bp_screens', 'bp_core_wpsignup_redirect' ); 616 616 617 617 ?> -
trunk/bp-messages/bp-messages-functions.php
r4397 r4605 98 98 // Send screen notifications to the recipients 99 99 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' ); 101 101 102 102 // Send email notifications to the recipients -
trunk/bp-messages/bp-messages-template.php
r4558 r4605 173 173 } else { 174 174 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' ); 176 176 177 177 if ( 'sentbox' == $bp->current_action ) -
trunk/bp-settings/bp-settings-actions.php
r4558 r4605 2 2 /** General *******************************************************************/ 3 3 4 function bp_ settings_screen_general_settings() {4 function bp_core_screen_general_settings() { 5 5 global $bp; 6 6 … … 112 112 /** Notifications *************************************************************/ 113 113 114 function bp_ settings_screen_notification_settings() {114 function bp_core_screen_notification_settings() { 115 115 global $bp; 116 116 … … 140 140 /** Delete Account ************************************************************/ 141 141 142 function bp_ settings_screen_delete_account() {142 function bp_core_screen_delete_account() { 143 143 global $bp; 144 144 -
trunk/bp-settings/bp-settings-loader.php
r4381 r4605 74 74 'slug' => $this->slug, 75 75 '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', 78 78 'default_subnav_slug' => 'general' 79 79 ); … … 87 87 'parent_url' => $settings_link, 88 88 'parent_slug' => $this->slug, 89 'screen_function' => 'bp_ settings_screen_general_settings',89 'screen_function' => 'bp_core_screen_general_settings', 90 90 'position' => 10, 91 'user_has_access' => bp_ members_can_edit_settings()91 'user_has_access' => bp_core_can_edit_settings() 92 92 ); 93 93 … … 98 98 'parent_url' => $settings_link, 99 99 'parent_slug' => $this->slug, 100 'screen_function' => 'bp_ settings_screen_notification_settings',100 'screen_function' => 'bp_core_screen_notification_settings', 101 101 'position' => 20, 102 'user_has_access' => bp_ members_can_edit_settings()102 'user_has_access' => bp_core_can_edit_settings() 103 103 ); 104 104 … … 110 110 'parent_url' => $settings_link, 111 111 'parent_slug' => $this->slug, 112 'screen_function' => 'bp_ settings_screen_delete_account',112 'screen_function' => 'bp_core_screen_delete_account', 113 113 'position' => 90, 114 114 'user_has_access' => bp_is_my_profile()
Note: See TracChangeset
for help on using the changeset viewer.