Skip to:
Content

BuddyPress.org

Ticket #8738: 8738.patch

File 8738.patch, 943 bytes (added by amitraj2203, 2 months ago)

Patch file

  • src/bp-groups/bp-groups-functions.php

    diff --git a/src/bp-groups/bp-groups-functions.php b/src/bp-groups/bp-groups-functions.php
    index 6dc11b7d8..5b845eccc 100644
    a b function groups_edit_base_group_details( $args = array() ) { 
    388388        }
    389389
    390390        if ( $r['notify_members'] ) {
    391                 groups_notification_group_updated( $group->id, $old_group );
     391                /**
     392                 * Filters whether to send group update notifications to members.
     393                 *
     394                 * @since 12.0.0
     395                 *
     396                 * @param bool $notify_members Whether to send notifications.
     397                 * @param int  $group_id      ID of the group being updated.
     398                 * @param BP_Groups_Group $old_group Group object before the update.
     399                 */
     400                $should_notify = apply_filters( 'bp_groups_notify_members_on_update', $r['notify_members'], $group->id, $old_group );
     401                if ( $should_notify ) {
     402                        groups_notification_group_updated( $group->id, $old_group );
     403                }
    392404        }
    393405
    394406        /**