Changeset 12932 for trunk/src/bp-core/bp-core-functions.php
- Timestamp:
- 04/29/2021 01:28:50 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r12931 r12932 3978 3978 function bp_email_get_type_schema( $field = 'description' ) { 3979 3979 $activity_comment = array( 3980 'description' => __( 'A member has replied to an activity update that the recipient posted.', 'buddypress' ), 3981 'unsubscribe' => array( 3982 'meta_key' => 'notification_activity_new_reply', 3983 'message' => __( 'You will no longer receive emails when someone replies to an update or comment you posted.', 'buddypress' ), 3980 'description' => __( 'A member has replied to an activity update that the recipient posted.', 'buddypress' ), 3981 'named_salutation' => true, 3982 'unsubscribe' => array( 3983 'meta_key' => 'notification_activity_new_reply', 3984 'message' => __( 'You will no longer receive emails when someone replies to an update or comment you posted.', 'buddypress' ), 3984 3985 ), 3985 3986 ); 3986 3987 3987 3988 $activity_comment_author = array( 3988 'description' => __( 'A member has replied to a comment on an activity update that the recipient posted.', 'buddypress' ), 3989 'unsubscribe' => array( 3990 'meta_key' => 'notification_activity_new_reply', 3991 'message' => __( 'You will no longer receive emails when someone replies to an update or comment you posted.', 'buddypress' ), 3989 'description' => __( 'A member has replied to a comment on an activity update that the recipient posted.', 'buddypress' ), 3990 'named_salutation' => true, 3991 'unsubscribe' => array( 3992 'meta_key' => 'notification_activity_new_reply', 3993 'message' => __( 'You will no longer receive emails when someone replies to an update or comment you posted.', 'buddypress' ), 3992 3994 ), 3993 3995 ); 3994 3996 3995 3997 $activity_at_message = array( 3996 'description' => __( 'Recipient was mentioned in an activity update.', 'buddypress' ), 3997 'unsubscribe' => array( 3998 'meta_key' => 'notification_activity_new_mention', 3999 'message' => __( 'You will no longer receive emails when someone mentions you in an update.', 'buddypress' ), 3998 'description' => __( 'Recipient was mentioned in an activity update.', 'buddypress' ), 3999 'named_salutation' => true, 4000 'unsubscribe' => array( 4001 'meta_key' => 'notification_activity_new_mention', 4002 'message' => __( 'You will no longer receive emails when someone mentions you in an update.', 'buddypress' ), 4000 4003 ), 4001 4004 ); 4002 4005 4003 4006 $groups_at_message = array( 4004 'description' => __( 'Recipient was mentioned in a group activity update.', 'buddypress' ), 4005 'unsubscribe' => array( 4006 'meta_key' => 'notification_activity_new_mention', 4007 'message' => __( 'You will no longer receive emails when someone mentions you in an update.', 'buddypress' ), 4007 'description' => __( 'Recipient was mentioned in a group activity update.', 'buddypress' ), 4008 'named_salutation' => true, 4009 'unsubscribe' => array( 4010 'meta_key' => 'notification_activity_new_mention', 4011 'message' => __( 'You will no longer receive emails when someone mentions you in an update.', 'buddypress' ), 4008 4012 ), 4009 4013 ); 4010 4014 4011 4015 $core_user_registration = array( 4012 'description' => __( 'Recipient has registered for an account.', 'buddypress' ), 4013 'unsubscribe' => false, 4016 'description' => __( 'Recipient has registered for an account.', 'buddypress' ), 4017 'named_salutation' => true, 4018 'unsubscribe' => false, 4014 4019 ); 4015 4020 4016 4021 $core_user_registration_with_blog = array( 4017 'description' => __( 'Recipient has registered for an account and site.', 'buddypress' ), 4018 'unsubscribe' => false, 4022 'description' => __( 'Recipient has registered for an account and site.', 'buddypress' ), 4023 'named_salutation' => true, 4024 'unsubscribe' => false, 4019 4025 ); 4020 4026 4021 4027 $friends_request = array( 4022 'description' => __( 'A member has sent a friend request to the recipient.', 'buddypress' ), 4023 'unsubscribe' => array( 4024 'meta_key' => 'notification_friends_friendship_request', 4025 'message' => __( 'You will no longer receive emails when someone sends you a friend request.', 'buddypress' ), 4028 'description' => __( 'A member has sent a friend request to the recipient.', 'buddypress' ), 4029 'named_salutation' => true, 4030 'unsubscribe' => array( 4031 'meta_key' => 'notification_friends_friendship_request', 4032 'message' => __( 'You will no longer receive emails when someone sends you a friend request.', 'buddypress' ), 4026 4033 ), 4027 4034 ); 4028 4035 4029 4036 $friends_request_accepted = array( 4030 'description' => __( 'Recipient has had a friend request accepted by a member.', 'buddypress' ), 4031 'unsubscribe' => array( 4032 'meta_key' => 'notification_friends_friendship_accepted', 4033 'message' => __( 'You will no longer receive emails when someone accepts your friendship request.', 'buddypress' ), 4037 'description' => __( 'Recipient has had a friend request accepted by a member.', 'buddypress' ), 4038 'named_salutation' => true, 4039 'unsubscribe' => array( 4040 'meta_key' => 'notification_friends_friendship_accepted', 4041 'message' => __( 'You will no longer receive emails when someone accepts your friendship request.', 'buddypress' ), 4034 4042 ), 4035 4043 ); 4036 4044 4037 4045 $groups_details_updated = array( 4038 'description' => __( "A group's details were updated.", 'buddypress' ), 4039 'unsubscribe' => array( 4040 'meta_key' => 'notification_groups_group_updated', 4041 'message' => __( 'You will no longer receive emails when one of your groups is updated.', 'buddypress' ), 4046 'description' => __( "A group's details were updated.", 'buddypress' ), 4047 'named_salutation' => true, 4048 'unsubscribe' => array( 4049 'meta_key' => 'notification_groups_group_updated', 4050 'message' => __( 'You will no longer receive emails when one of your groups is updated.', 'buddypress' ), 4042 4051 ), 4043 4052 ); 4044 4053 4045 4054 $groups_invitation = array( 4046 'description' => __( 'A member has sent a group invitation to the recipient.', 'buddypress' ), 4047 'unsubscribe' => array( 4048 'meta_key' => 'notification_groups_invite', 4049 'message' => __( 'You will no longer receive emails when you are invited to join a group.', 'buddypress' ), 4055 'description' => __( 'A member has sent a group invitation to the recipient.', 'buddypress' ), 4056 'named_salutation' => true, 4057 'unsubscribe' => array( 4058 'meta_key' => 'notification_groups_invite', 4059 'message' => __( 'You will no longer receive emails when you are invited to join a group.', 'buddypress' ), 4050 4060 ), 4051 4061 ); 4052 4062 4053 4063 $groups_member_promoted = array( 4054 'description' => __( "Recipient's status within a group has changed.", 'buddypress' ), 4055 'unsubscribe' => array( 4056 'meta_key' => 'notification_groups_admin_promotion', 4057 'message' => __( 'You will no longer receive emails when you have been promoted in a group.', 'buddypress' ), 4064 'description' => __( "Recipient's status within a group has changed.", 'buddypress' ), 4065 'named_salutation' => true, 4066 'unsubscribe' => array( 4067 'meta_key' => 'notification_groups_admin_promotion', 4068 'message' => __( 'You will no longer receive emails when you have been promoted in a group.', 'buddypress' ), 4058 4069 ), 4059 4070 ); 4060 4071 4061 4072 $groups_membership_request = array( 4062 'description' => __( 'A member has requested permission to join a group.', 'buddypress' ), 4063 'unsubscribe' => array( 4064 'meta_key' => 'notification_groups_membership_request', 4065 'message' => __( 'You will no longer receive emails when someone requests to be a member of your group.', 'buddypress' ), 4073 'description' => __( 'A member has requested permission to join a group.', 'buddypress' ), 4074 'named_salutation' => true, 4075 'unsubscribe' => array( 4076 'meta_key' => 'notification_groups_membership_request', 4077 'message' => __( 'You will no longer receive emails when someone requests to be a member of your group.', 'buddypress' ), 4066 4078 ), 4067 4079 ); 4068 4080 4069 4081 $messages_unread = array( 4070 'description' => __( 'Recipient has received a private message.', 'buddypress' ), 4071 'unsubscribe' => array( 4072 'meta_key' => 'notification_messages_new_message', 4073 'message' => __( 'You will no longer receive emails when someone sends you a message.', 'buddypress' ), 4082 'description' => __( 'Recipient has received a private message.', 'buddypress' ), 4083 'named_salutation' => true, 4084 'unsubscribe' => array( 4085 'meta_key' => 'notification_messages_new_message', 4086 'message' => __( 'You will no longer receive emails when someone sends you a message.', 'buddypress' ), 4074 4087 ), 4075 4088 ); 4076 4089 4077 4090 $settings_verify_email_change = array( 4078 'description' => __( 'Recipient has changed their email address.', 'buddypress' ), 4079 'unsubscribe' => false, 4091 'description' => __( 'Recipient has changed their email address.', 'buddypress' ), 4092 'named_salutation' => true, 4093 'unsubscribe' => false, 4080 4094 ); 4081 4095 4082 4096 $groups_membership_request_accepted = array( 4083 'description' => __( 'Recipient had requested to join a group, which was accepted.', 'buddypress' ), 4084 'unsubscribe' => array( 4085 'meta_key' => 'notification_membership_request_completed', 4086 'message' => __( 'You will no longer receive emails when your request to join a group has been accepted or denied.', 'buddypress' ), 4097 'description' => __( 'Recipient had requested to join a group, which was accepted.', 'buddypress' ), 4098 'named_salutation' => true, 4099 'unsubscribe' => array( 4100 'meta_key' => 'notification_membership_request_completed', 4101 'message' => __( 'You will no longer receive emails when your request to join a group has been accepted or denied.', 'buddypress' ), 4087 4102 ), 4088 4103 ); 4089 4104 4090 4105 $groups_membership_request_rejected = array( 4091 'description' => __( 'Recipient had requested to join a group, which was rejected.', 'buddypress' ), 4092 'unsubscribe' => array( 4093 'meta_key' => 'notification_membership_request_completed', 4094 'message' => __( 'You will no longer receive emails when your request to join a group has been accepted or denied.', 'buddypress' ), 4106 'description' => __( 'Recipient had requested to join a group, which was rejected.', 'buddypress' ), 4107 'named_salutation' => true, 4108 'unsubscribe' => array( 4109 'meta_key' => 'notification_membership_request_completed', 4110 'message' => __( 'You will no longer receive emails when your request to join a group has been accepted or denied.', 'buddypress' ), 4095 4111 ), 4096 4112 ); 4097 4113 4098 4114 $core_user_activation = array( 4099 'description' => __( 'Recipient has successfully activated an account.', 'buddypress' ), 4115 'description' => __( 'Recipient has successfully activated an account.', 'buddypress' ), 4116 'named_salutation' => true, 4117 'unsubscribe' => false, 4100 4118 ); 4101 4119 4102 4120 $members_invitation = array( 4103 'description' => __( 'A site member has sent a site invitation to the recipient.', 'buddypress' ), 4104 'unsubscribe' => array( 4105 'meta_key' => 'notification_bp_members_invite', 4106 'message' => __( 'You will no longer receive emails when you are invited to join this site.', 'buddypress' ), 4121 'description' => __( 'A site member has sent a site invitation to the recipient.', 'buddypress' ), 4122 'named_salutation' => false, 4123 'unsubscribe' => array( 4124 'meta_key' => 'notification_bp_members_invite', 4125 'message' => __( 'You will no longer receive emails when you are invited to join this site.', 'buddypress' ), 4107 4126 ), 4108 4127 ); … … 4351 4370 4352 4371 /** 4372 * Gets the BP Email type of a BP Email ID or object. 4373 * 4374 * @since 8.0.0 4375 * 4376 * @param int|WP_Post $email Optional. BP Email ID or BP Email object. Defaults to global $post. 4377 * @return string The type of the BP Email object. 4378 */ 4379 function bp_email_get_type( $email = null ) { 4380 $email = get_post( $email ); 4381 4382 if ( ! $email ) { 4383 return ''; 4384 } 4385 4386 $types = bp_get_object_terms( $email->ID, bp_get_email_tax_type(), array( 'fields' => 'slugs' ) ); 4387 $type = reset( $types ); 4388 4389 return $type; 4390 } 4391 4392 /** 4353 4393 * Get BuddyPress content allowed tags. 4354 4394 *
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)