<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][9489] trunk/src/bp-groups/bp-groups-notifications.php: Adds hooks documentation to bp-groups-notifications.php.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/9489">9489</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/9489","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>tw2113</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-02-17 05:44:33 +0000 (Tue, 17 Feb 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Adds hooks documentation to bp-groups-notifications.php.
See <a href="http://buddypress.trac.wordpress.org/ticket/5943">#5943</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpgroupsbpgroupsnotificationsphp">trunk/src/bp-groups/bp-groups-notifications.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpgroupsbpgroupsnotificationsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-groups/bp-groups-notifications.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/bp-groups-notifications.php 2015-02-17 05:31:15 UTC (rev 9488)
+++ trunk/src/bp-groups/bp-groups-notifications.php 2015-02-17 05:44:33 UTC (rev 9489)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -90,9 +90,35 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /* Send the message */
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the user email that the group update notification will be sent to.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $to User email the notification is being sent to.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $to = apply_filters( 'groups_notification_group_updated_to', $to );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the group update notification subject that will be sent to user.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $subject Email notification subject text.
+ * @param BP_Groups_Group $group Object holding the current group instance. Passed by reference.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $subject = apply_filters_ref_array( 'groups_notification_group_updated_subject', array( $subject, &$group ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the group update notification message that will be sent to user.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $message Email notification message text.
+ * @param BP_Groups_Group $group Object holding the current group instance. Passed by reference.
+ * @param string $group_link URL permalink to the group that was updated.
+ * @param string $settings_link URL permalink for the user's notification settings area.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $message = apply_filters_ref_array( 'groups_notification_group_updated_message', array( $message, &$group, $group_link, $settings_link ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_mail( $to, $subject, $message );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -100,6 +126,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $message, $to );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Fires after the notification is sent that a group has been updated.
+ *
+ * See https://buddypress.trac.wordpress.org/ticket/3644 for blank message parameter.
+ *
+ * @since BuddyPress (1.5.0)
+ *
+ * @param array $user_ids Array of user IDs to notify about the update.
+ * @param string $subject Email notification subject text.
+ * @param string $value Empty string preventing PHP error.
+ * @param int $group_id ID of the group that was updated.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_groups_sent_updated_email', $user_ids, $subject, '', $group_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -191,13 +229,53 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Send the message
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the user email that the group membership request will be sent to.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $to User email the request is being sent to.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $to = apply_filters( 'groups_notification_new_membership_request_to', $to );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the group membership request subject that will be sent to user.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $subject Membership request email subject text.
+ * @param BP_Groups_Group $group Object holding the current group instance. Passed by reference.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $subject = apply_filters_ref_array( 'groups_notification_new_membership_request_subject', array( $subject, &$group ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the group membership request message that will be sent to user.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $message Membership request email message text.
+ * @param BP_Groups_Group $group Object holding the current group instance. Passed by reference.
+ * @param string $requesting_user_name Username of who is requesting membership.
+ * @param string $profile_link URL permalink for the profile for the user requesting membership.
+ * @param string $group_requests URL permalink for the group requests screen for group being requested membership to.
+ * @param string $settings_link URL permalink for the user's notification settings area.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $message = apply_filters_ref_array( 'groups_notification_new_membership_request_message', array( $message, &$group, $requesting_user_name, $profile_link, $group_requests, $settings_link ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_mail( $to, $subject, $message );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Fires after the notification is sent that a member has requested group membership.
+ *
+ * @since BuddyPress (1.5.0)
+ *
+ * @param int $admin_id ID of the group administrator.
+ * @param string $subject Email notification subject text.
+ * @param string $message Email notification message text.
+ * @param int $requesting_user_id ID of the user requesting membership.
+ * @param int $group_id ID of the group receiving membership request.
+ * @param int $membership_id ID of the group membership object.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_groups_sent_membership_request_email', $admin_id, $subject, $message, $requesting_user_id, $group_id, $membership_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -269,13 +347,49 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Send the message
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the user email that the group membership request result will be sent to.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $to User email the request result is being sent to.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $to = apply_filters( 'groups_notification_membership_request_completed_to', $to );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the group membership request result subject that will be sent to user.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $subject Membership request result email subject text.
+ * @param BP_Groups_Group $group Object holding the current group instance. Passed by reference.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $subject = apply_filters_ref_array( 'groups_notification_membership_request_completed_subject', array( $subject, &$group ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the group membership request result message that will be sent to user.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $message Membership request result email message text.
+ * @param BP_Groups_Group $group Object holding the current group instance. Passed by reference.
+ * @param string $group_link URL permalink for the group that was requested membership for.
+ * @param string $settings_link URL permalink for the user's notification settings area.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $message = apply_filters_ref_array( 'groups_notification_membership_request_completed_message', array( $message, &$group, $group_link, $settings_link ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_mail( $to, $subject, $message );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Fires after the notification is sent that a membership has been approved.
+ *
+ * @since BuddyPress (1.5.0)
+ *
+ * @param int $requesting_user_id ID of the user whose membership was approved.
+ * @param string $subject Email notification subject text.
+ * @param string $message Email notification message text.
+ * @param int $group_id ID of the group that was joined.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_groups_sent_membership_approved_email', $requesting_user_id, $subject, $message, $group_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'groups_membership_accepted', 'groups_notification_membership_request_completed', 10, 3 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -338,13 +452,50 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Send the message
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the user email that the group promotion notification will be sent to.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $to User email the promotion notification is being sent to.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $to = apply_filters( 'groups_notification_promoted_member_to', $to );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the group promotion notification subject that will be sent to user.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $subject Promotion notification email subject text.
+ * @param BP_Groups_Group $group Object holding the current group instance. Passed by reference.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $subject = apply_filters_ref_array( 'groups_notification_promoted_member_subject', array( $subject, &$group ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the group promotion notification message that will be sent to user.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $message Promotion notification email message text.
+ * @param BP_Groups_Group $group Object holding the current group instance. Passed by reference.
+ * @param string $promoted_to Role that the user was promoted to within the group.
+ * @param string $group_link URL permalink for the group that the promotion was related to.
+ * @param string $settings_link URL permalink for the user's notification settings area.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $message = apply_filters_ref_array( 'groups_notification_promoted_member_message', array( $message, &$group, $promoted_to, $group_link, $settings_link ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_mail( $to, $subject, $message );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Fires after the notification is sent that a member has been promoted.
+ *
+ * @since BuddyPress (1.5.0)
+ *
+ * @param int $user_id ID of the user who was promoted.
+ * @param string $subject Email notification subject text.
+ * @param string $message Email notification message text.
+ * @param int $group_id ID of the group that the user is a member of.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_groups_sent_promoted_email', $user_id, $subject, $message, $group_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'groups_promoted_member', 'groups_notification_promoted_member', 10, 2 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -416,13 +567,52 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Send the message
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Filters the user email that the group invite notification will be sent to.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $to User email the invite notification is being sent to.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $to = apply_filters( 'groups_notification_group_invites_to', $to );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the group invite notification subject that will be sent to user.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $subject Invite notification email subject text.
+ * @param BP_Groups_Group $group Object holding the current group instance. Passed by reference.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $subject = apply_filters_ref_array( 'groups_notification_group_invites_subject', array( $subject, &$group ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Filters the group invite notification message that will be sent to user.
+ *
+ * @since BuddyPress (1.2.0)
+ *
+ * @param string $message Invite notification email message text.
+ * @param BP_Groups_Group $group Object holding the current group instance. Passed by reference.
+ * @param string $inviter_name Username for the person doing the inviting.
+ * @param string $inviter_link Profile link for the person doing the inviting.
+ * @param string $invites_link URL permalink for the invited user's invite management screen.
+ * @param string $group_link URL permalink for the group that the invite was related to.
+ * @param string $settings_link URL permalink for the user's notification settings area.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $message = apply_filters_ref_array( 'groups_notification_group_invites_message', array( $message, &$group, $inviter_name, $inviter_link, $invites_link, $group_link, $settings_link ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_mail( $to, $subject, $message );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Fires after the notification is sent that a member has been invited to a group.
+ *
+ * @since BuddyPress (1.5.0)
+ *
+ * @param int $invited_user_id ID of the user who was invited.
+ * @param string $subject Email notification subject text.
+ * @param string $message Email notification message text.
+ * @param BP_Groups_Group $group Group object.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'bp_groups_sent_invited_email', $invited_user_id, $subject, $message, $group );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -462,6 +652,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $notification_link = $group_link . 'admin/membership-requests/?n=1';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'string' == $format ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters groups multiple new membership request notification for string format.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -479,6 +670,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_groups_' . $amount . '_' . $action . 's_notification', '<a href="' . $notification_link . '" title="' . __( 'Group Membership Requests', 'buddypress' ) . '">' . $text . '</a>', $group_link, $total_items, $group->name, $text, $notification_link );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters groups multiple new membership request notification for any non-string format.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -505,6 +697,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $notification_link = $group_link . 'admin/membership-requests/?n=1';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'string' == $format ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters groups single new membership request notification for string format.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -522,6 +715,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_groups_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '" title="' . sprintf( __( '%s requests group membership', 'buddypress' ), $user_fullname ) . '">' . $text . '</a>', $group_link, $user_fullname, $group->name, $text, $notification_link );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters groups single new membership request notification for any non-string format.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -559,6 +753,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $notification_link = trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ) . '?n=1';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'string' == $format ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters multiple accepted group membership requests notification for string format.
</span><span class="cx" style="display: block; padding: 0 10px"> * Complete filter - bp_groups_multiple_membership_request_accepted_notification.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -573,6 +768,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_groups_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name, $text, $notification_link );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters multiple accepted group membership requests notification for non-string format.
</span><span class="cx" style="display: block; padding: 0 10px"> * Complete filter - bp_groups_multiple_membership_request_accepted_notification.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -596,6 +792,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $notification_link = $group_link . '?n=1';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'string' == $format ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters single accepted group membership request notification for string format.
</span><span class="cx" style="display: block; padding: 0 10px"> * Complete filter - bp_groups_single_membership_request_accepted_notification.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -610,6 +807,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_groups_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters single accepted group membership request notification for non-string format.
</span><span class="cx" style="display: block; padding: 0 10px"> * Complete filter - bp_groups_single_membership_request_accepted_notification.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -644,6 +842,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $notification_link = trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ) . '?n=1';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'string' == $format ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters multiple rejected group membership requests notification for string format.
</span><span class="cx" style="display: block; padding: 0 10px"> * Complete filter - bp_groups_multiple_membership_request_rejected_notification.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -658,6 +857,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_groups_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters multiple rejected group membership requests notification for non-string format.
</span><span class="cx" style="display: block; padding: 0 10px"> * Complete filter - bp_groups_multiple_membership_request_rejected_notification.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -680,6 +880,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $notification_link = $group_link . '?n=1';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'string' == $format ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters single rejected group membership requests notification for string format.
</span><span class="cx" style="display: block; padding: 0 10px"> * Complete filter - bp_groups_single_membership_request_rejected_notification.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -694,13 +895,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_groups_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters single rejected group membership requests notification for non-string format.
</span><span class="cx" style="display: block; padding: 0 10px"> * Complete filter - bp_groups_single_membership_request_rejected_notification.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since BuddyPress (1.0.0)
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $array Array holding permalink and content for notification.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $array Array holding permalink and content for notification.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param int $group_link The permalink for the group.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $group->name Name of the group.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $text Notification content.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -962,6 +1164,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Fires right before returning the formatted group notifications.
+ *
+ * @since BuddyPress (1.0.0)
+ *
+ * @param string $action The type of notification being rendered.
+ * @param int $item_id The primary item ID.
+ * @param int $secondary_item_id The secondary item ID.
+ * @param int $total_items Total amount of items to format.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> do_action( 'groups_format_notifications', $action, $item_id, $secondary_item_id, $total_items );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span></span></pre>
</div>
</div>
</body>
</html>