Skip to:
Content

BuddyPress.org

Ticket #5970: bp-groups-notifications-5970.diff

File bp-groups-notifications-5970.diff, 27.6 KB (added by Mamaduka, 10 years ago)
  • src/bp-groups/bp-groups-notifications.php

    diff --git src/bp-groups/bp-groups-notifications.php src/bp-groups/bp-groups-notifications.php
    index 447b527..bc346a1 100644
    function groups_format_notifications( $action, $item_id, $secondary_item_id, $to 
    415415
    416416                        $group = groups_get_group( array( 'group_id' => $group_id ) );
    417417                        $group_link = bp_get_group_permalink( $group );
     418                        $amount = 'single';
    418419
    419420                        // Set up the string and the filter
    420421                        // Because different values are passed to the filters, we'll return the
    421422                        // values inline
    422423                        if ( (int) $total_items > 1 ) {
    423424                                $text = sprintf( __( '%1$d new membership requests for the group "%2$s"', 'buddypress' ), (int) $total_items, $group->name );
    424                                 $filter = 'bp_groups_multiple_new_membership_requests_notification';
     425                                $amount = 'multiple';
    425426                                $notification_link = $group_link . 'admin/membership-requests/?n=1';
    426427
    427428                                if ( 'string' == $format ) {
    428                                         return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Group Membership Requests', 'buddypress' ) . '">' . $text . '</a>', $group_link, $total_items, $group->name, $text, $notification_link );
     429                                        /**
     430                                         * Filters groups multiple new membership request notification for string format.
     431                                         *
     432                                         * This is variable filter that is dependent on item count and action.
     433                                         * Complete filter - bp_groups_multiple_new_membership_requests_notification.
     434                                         *
     435                                         * @since 1.0.0
     436                                         *
     437                                         * @param string $string            HTML anchor tag for request.
     438                                         * @param string $group_link        The permalink for the group.
     439                                         * @param int    $total_items       Total number of membership requests.
     440                                         * @param string $group->name       Name of the group.
     441                                         * @param string $text              Notification content.
     442                                         * @param string $notification_link The permalink for notification.
     443                                         */
     444                                        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 );
    429445                                } else {
    430                                         return apply_filters( $filter, array(
     446                                        /**
     447                                         * Filters groups multiple new membership request notification for any non-string format.
     448                                         *
     449                                         * This is variable filter that is dependent on item count and action.
     450                                         * Complete filter - bp_groups_multiple_new_membership_requests_notification.
     451                                         *
     452                                         * @since 1.0.0
     453                                         *
     454                                         * @param array  $array             Array holding permalink and content for notification.
     455                                         * @param string $group_link        The permalink for the group.
     456                                         * @param int    $total_items       Total number of membership requests.
     457                                         * @param string $group->name       Name of the group.
     458                                         * @param string $text              Notification content.
     459                                         * @param string $notification_link The permalink for notification.
     460                                         */
     461                                        return apply_filters( 'bp_groups_' . $amount . '_' . $action . 's_notification', array(
    431462                                                'link' => $notification_link,
    432463                                                'text' => $text
    433464                                        ), $group_link, $total_items, $group->name, $text, $notification_link );
    function groups_format_notifications( $action, $item_id, $secondary_item_id, $to 
    435466                        } else {
    436467                                $user_fullname = bp_core_get_user_displayname( $requesting_user_id );
    437468                                $text = sprintf( __( '%s requests group membership', 'buddypress' ), $user_fullname );
    438                                 $filter = 'bp_groups_single_new_membership_request_notification';
    439469                                $notification_link = $group_link . 'admin/membership-requests/?n=1';
    440470
    441471                                if ( 'string' == $format ) {
    442                                         return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . sprintf( __( '%s requests group membership', 'buddypress' ), $user_fullname ) . '">' . $text . '</a>', $group_link, $user_fullname, $group->name, $text, $notification_link );
     472                                        /**
     473                                         * Filters groups single new membership request notification for string format.
     474                                         *
     475                                         * This is variable filter that is dependent on item count and action.
     476                                         * Complete filter - bp_groups_single_new_membership_request_notification.
     477                                         *
     478                                         * @since 1.0.0
     479                                         *
     480                                         * @param string $string            HTML anchor tag for request.
     481                                         * @param string $group_link        The permalink for the group.
     482                                         * @param string $user_fullname     Full name of requesting user.
     483                                         * @param string $group->name       Name of the group.
     484                                         * @param string $text              Notification content.
     485                                         * @param string $notification_link The permalink for notification.
     486                                         */
     487                                        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 );
    443488                                } else {
    444                                         return apply_filters( $filter, array(
     489                                        /**
     490                                         * Filters groups single new membership request notification for any non-string format.
     491                                         *
     492                                         * This is variable filter that is dependent on item count and action.
     493                                         * Complete filter - bp_groups_single_new_membership_request_notification.
     494                                         *
     495                                         * @since 1.0.0
     496                                         *
     497                                         * @param array  $array             Array holding permalink and content for notification.
     498                                         * @param string $group_link        The permalink for the group.
     499                                         * @param string $user_fullname     Full name of requesting user.
     500                                         * @param string $group->name       Name of the group.
     501                                         * @param string $text              Notification content.
     502                                         * @param string $notification_link The permalink for notification.
     503                                         */
     504                                        return apply_filters( 'bp_groups_' . $amount . '_' . $action . '_notification', array(
    445505                                                'link' => $notification_link,
    446506                                                'text' => $text
    447507                                        ), $group_link, $user_fullname, $group->name, $text, $notification_link );
    function groups_format_notifications( $action, $item_id, $secondary_item_id, $to 
    455515
    456516                        $group = groups_get_group( array( 'group_id' => $group_id ) );
    457517                        $group_link = bp_get_group_permalink( $group );
     518                        $amount = 'single';
    458519
    459520                        if ( (int) $total_items > 1 ) {
    460521                                $text = sprintf( __( '%d accepted group membership requests', 'buddypress' ), (int) $total_items, $group->name );
    461                                 $filter = 'bp_groups_multiple_membership_request_accepted_notification';
     522                                $amount = 'multiple';
    462523                                $notification_link = trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ) . '?n=1';
    463524
    464525                                if ( 'string' == $format ) {
    465                                         return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name, $text, $notification_link );
     526                                        /**
     527                                         * Filters multiple accepted group membership requests notification for string format.
     528                                         * Complete filter - bp_groups_multiple_membership_request_accepted_notification.
     529                                         *
     530                                         * @since 1.0.0
     531                                         *
     532                                         * @param string $string            HTML anchor tag for notification.
     533                                         * @param int    $total_items       Total number of accepted requests.
     534                                         * @param string $group->name       Name of the group.
     535                                         * @param string $text              Notification content.
     536                                         * @param string $notification_link The permalink for notification.
     537                                         */
     538                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name, $text, $notification_link );
    466539                                } else {
    467                                         return apply_filters( $filter, array(
     540                                        /**
     541                                         * Filters multiple accepted group membership requests notification for non-string format.
     542                                         * Complete filter - bp_groups_multiple_membership_request_accepted_notification.
     543                                         *
     544                                         * @since 1.0.0
     545                                         *
     546                                         * @param array  $array             Array holding permalink and content for notification
     547                                         * @param int    $total_items       Total number of accepted requests.
     548                                         * @param string $group->name       Name of the group.
     549                                         * @param string $text              Notification content.
     550                                         * @param string $notification_link The permalink for notification.
     551                                         */
     552                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', array(
    468553                                                'link' => $notification_link,
    469554                                                'text' => $text
    470555                                        ), $total_items, $group->name, $text, $notification_link );
    function groups_format_notifications( $action, $item_id, $secondary_item_id, $to 
    475560                                $notification_link = $group_link . '?n=1';
    476561
    477562                                if ( 'string' == $format ) {
    478                                         return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
     563                                        /**
     564                                         * Filters single accepted group membership request notification for string format.
     565                                         * Complete filter - bp_groups_single_membership_request_accepted_notification.
     566                                         *
     567                                         * @since 1.0.0
     568                                         *
     569                                         * @param string $string            HTML anchor tag for notification.
     570                                         * @param string $group_link        The permalink for the group.
     571                                         * @param string $group->name       Name of the group.
     572                                         * @param string $text              Notification content.
     573                                         * @param string $notification_link The permalink for notification.
     574                                         */
     575                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
    479576                                } else {
     577                                        /**
     578                                         * Filters single accepted group membership request notification for non-string format.
     579                                         * Complete filter - bp_groups_single_membership_request_accepted_notification.
     580                                         *
     581                                         * @since 1.0.0
     582                                         *
     583                                         * @param array  $array             Array holding permalink and content for notification.
     584                                         * @param string $group_link        The permalink for the group.
     585                                         * @param string $group->name       Name of the group.
     586                                         * @param string $text              Notification content.
     587                                         * @param string $notification_link The permalink for notification.
     588                                         */
    480589                                        return apply_filters( $filter, array(
    481590                                                'link' => $notification_link,
    482591                                                'text' => $text
    function groups_format_notifications( $action, $item_id, $secondary_item_id, $to 
    491600
    492601                        $group = groups_get_group( array( 'group_id' => $group_id ) );
    493602                        $group_link = bp_get_group_permalink( $group );
     603                        $amount = 'single';
    494604
    495605                        if ( (int) $total_items > 1 ) {
    496606                                $text = sprintf( __( '%d rejected group membership requests', 'buddypress' ), (int) $total_items, $group->name );
    497                                 $filter = 'bp_groups_multiple_membership_request_rejected_notification';
     607                                $amount = 'multiple';
    498608                                $notification_link = trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ) . '?n=1';
    499609
    500610                                if ( 'string' == $format ) {
    501                                         return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name );
     611                                        /**
     612                                         * Filters multiple rejected group membership requests notification for string format.
     613                                         * Complete filter - bp_groups_multiple_membership_request_rejected_notification.
     614                                         *
     615                                         * @since 1.0.0
     616                                         *
     617                                         * @param string $string            HTML anchor tag for notification.
     618                                         * @param int    $total_items       Total number of rejected requests.
     619                                         * @param string $group->name       Name of the group.
     620                                         * @param string $text              Notification content.
     621                                         * @param string $notification_link The permalink for notification.
     622                                         */
     623                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name );
    502624                                } else {
    503                                         return apply_filters( $filter, array(
     625                                        /**
     626                                         * Filters multiple rejected group membership requests notification for non-string format.
     627                                         * Complete filter - bp_groups_multiple_membership_request_rejected_notification.
     628                                         *
     629                                         * @since 1.0.0
     630                                         *
     631                                         * @param array  $array             Array holding permalink and content for notification.
     632                                         * @param int    $total_items       Total number of rejected requests.
     633                                         * @param string $group->name       Name of the group.
     634                                         * @param string $text              Notification content.
     635                                         * @param string $notification_link The permalink for notification.
     636                                         */
     637                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', array(
    504638                                                'link' => $notification_link,
    505639                                                'text' => $text
    506640                                        ), $total_items, $group->name, $text, $notification_link );
    507641                                }
    508642                        } else {
    509643                                $text = sprintf( __( 'Membership for group "%s" rejected', 'buddypress' ), $group->name );
    510                                 $filter = 'bp_groups_single_membership_request_rejected_notification';
    511644                                $notification_link = $group_link . '?n=1';
    512645
    513646                                if ( 'string' == $format ) {
    514                                         return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
     647                                        /**
     648                                         * Filters single rejected group membership requests notification for string format.
     649                                         * Complete filter - bp_groups_single_membership_request_rejected_notification.
     650                                         *
     651                                         * @since 1.0.0
     652                                         *
     653                                         * @param string $string            HTML anchor tag for notification.
     654                                         * @param int    $group_link        The permalink for the group.
     655                                         * @param string $group->name       Name of the group.
     656                                         * @param string $text              Notification content.
     657                                         * @param string $notification_link The permalink for notification.
     658                                         */
     659                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
    515660                                } else {
    516                                         return apply_filters( $filter, array(
     661                                        /**
     662                                         * Filters single rejected group membership requests notification for non-string format.
     663                                         * Complete filter - bp_groups_single_membership_request_rejected_notification.
     664                                         *
     665                                         * @since 1.0.0
     666                                         *
     667                                         * @param array  $array              Array holding permalink and content for notification.
     668                                         * @param int    $group_link        The permalink for the group.
     669                                         * @param string $group->name       Name of the group.
     670                                         * @param string $text              Notification content.
     671                                         * @param string $notification_link The permalink for notification.
     672                                         */
     673                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', array(
    517674                                                'link' => $notification_link,
    518675                                                'text' => $text
    519676                                        ), $group_link, $group->name, $text, $notification_link );
    function groups_format_notifications( $action, $item_id, $secondary_item_id, $to 
    527684
    528685                        $group = groups_get_group( array( 'group_id' => $group_id ) );
    529686                        $group_link = bp_get_group_permalink( $group );
     687                        $amount = 'single';
    530688
    531689                        if ( (int) $total_items > 1 ) {
    532690                                $text = sprintf( __( 'You were promoted to an admin in %d groups', 'buddypress' ), (int) $total_items );
    533                                 $filter = 'bp_groups_multiple_member_promoted_to_admin_notification';
     691                                $amount = 'multiple';
    534692                                $notification_link = trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ) . '?n=1';
    535693
    536694                                if ( 'string' == $format ) {
    537                                         return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
     695                                        /**
     696                                         * Filters multiple promoted to group admin notification for string format.
     697                                         * Complete filter - bp_groups_multiple_member_promoted_to_admin_notification.
     698                                         *
     699                                         * @since 1.0.0
     700                                         *
     701                                         * @param string $string            HTML anchor tag for notification.
     702                                         * @param int    $total_items       Total number of rejected requests.
     703                                         * @param string $text              Notification content.
     704                                         * @param string $notification_link The permalink for notification.
     705                                         */
     706                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
    538707                                } else {
     708                                        /**
     709                                         * Filters multiple promoted to group admin notification for non-string format.
     710                                         * Complete filter - bp_groups_multiple_member_promoted_to_admin_notification.
     711                                         *
     712                                         * @since 1.0.0
     713                                         *
     714                                         * @param array  $array             Array holding permalink and content for notification.
     715                                         * @param int    $total_items       Total number of rejected requests.
     716                                         * @param string $text              Notification content.
     717                                         * @param string $notification_link The permalink for notification.
     718                                         */
    539719                                        return apply_filters( $filter, array(
    540720                                                'link' => $notification_link,
    541721                                                'text' => $text
    function groups_format_notifications( $action, $item_id, $secondary_item_id, $to 
    543723                                }
    544724                        } else {
    545725                                $text = sprintf( __( 'You were promoted to an admin in the group "%s"', 'buddypress' ), $group->name );
    546                                 $filter = 'bp_groups_single_member_promoted_to_admin_notification';
    547726                                $notification_link = $group_link . '?n=1';
    548727
    549728                                if ( 'string' == $format ) {
    550                                         return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
     729                                        /**
     730                                         * Filters single promoted to group admin notification for non-string format.
     731                                         * Complete filter - bp_groups_single_member_promoted_to_admin_notification.
     732                                         *
     733                                         * @since 1.0.0
     734                                         *
     735                                         * @param string $string            HTML anchor tag for notification.
     736                                         * @param int    $group_link        The permalink for the group.
     737                                         * @param string $group->name       Name of the group.
     738                                         * @param string $text              Notification content.
     739                                         * @param string $notification_link The permalink for notification.
     740                                         */
     741                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
    551742                                } else {
    552                                         return apply_filters( $filter, array(
     743                                        /**
     744                                         * Filters single promoted to group admin notification for non-string format.
     745                                         * Complete filter - bp_groups_single_member_promoted_to_admin_notification.
     746                                         *
     747                                         * @since 1.0.0
     748                                         *
     749                                         * @param array  $array             Array holding permalink and content for notification.
     750                                         * @param int    $group_link        The permalink for the group.
     751                                         * @param string $group->name       Name of the group.
     752                                         * @param string $text              Notification content.
     753                                         * @param string $notification_link The permalink for notification.
     754                                         */
     755                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', array(
    553756                                                'link' => $notification_link,
    554757                                                'text' => $text
    555758                                        ), $group_link, $group->name, $text, $notification_link );
    function groups_format_notifications( $action, $item_id, $secondary_item_id, $to 
    563766
    564767                        $group = groups_get_group( array( 'group_id' => $group_id ) );
    565768                        $group_link = bp_get_group_permalink( $group );
     769                        $amount = 'single';
    566770
    567771                        if ( (int) $total_items > 1 ) {
    568772                                $text = sprintf( __( 'You were promoted to a mod in %d groups', 'buddypress' ), (int) $total_items );
    569                                 $filter = 'bp_groups_multiple_member_promoted_to_mod_notification';
     773                                $amount = 'multiple';
    570774                                $notification_link = trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ) . '?n=1';
    571775
    572776                                if ( 'string' == $format ) {
    573                                         return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
     777                                        /**
     778                                         * Filters multiple promoted to group mod notification for string format.
     779                                         * Complete filter - bp_groups_multiple_member_promoted_to_mod_notification.
     780                                         *
     781                                         * @since 1.0.0
     782                                         *
     783                                         * @param string $string            HTML anchor tag for notification.
     784                                         * @param int    $total_items       Total number of rejected requests.
     785                                         * @param string $text              Notification content.
     786                                         * @param string $notification_link The permalink for notification.
     787                                         */
     788                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
    574789                                } else {
    575                                         return apply_filters( $filter, array(
     790                                        /**
     791                                         * Filters multiple promoted to group mod notification for non-string format.
     792                                         * Complete filter - bp_groups_multiple_member_promoted_to_mod_notification.
     793                                         *
     794                                         * @since 1.0.0
     795                                         *
     796                                         * @param array  $array             Array holding permalink and content for notification.
     797                                         * @param int    $total_items       Total number of rejected requests.
     798                                         * @param string $text              Notification content.
     799                                         * @param string $notification_link The permalink for notification.
     800                                         */
     801                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', array(
    576802                                                'link' => $notification_link,
    577803                                                'text' => $text
    578804                                        ), $total_items, $text, $notification_link );
    579805                                }
    580806                        } else {
    581807                                $text = sprintf( __( 'You were promoted to a mod in the group "%s"', 'buddypress' ), $group->name );
    582                                 $filter = 'bp_groups_single_member_promoted_to_mod_notification';
    583808                                $notification_link = $group_link . '?n=1';
    584809
    585810                                if ( 'string' == $format ) {
    586                                         return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
     811                                        /**
     812                                         * Filters single promoted to group mod notification for string format.
     813                                         * Complete filter - bp_groups_single_member_promoted_to_mod_notification.
     814                                         *
     815                                         * @since 1.0.0
     816                                         *
     817                                         * @param string $string            HTML anchor tag for notification.
     818                                         * @param int    $group_link        The permalink for the group.
     819                                         * @param string $group->name       Name of the group.
     820                                         * @param string $text              Notification content.
     821                                         * @param string $notification_link The permalink for notification.
     822                                         */
     823                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
    587824                                } else {
    588                                         return apply_filters( $filter, array(
     825                                        /**
     826                                         * Filters single promoted to group admin notification for non-string format.
     827                                         * Complete filter - bp_groups_single_member_promoted_to_mod_notification.
     828                                         *
     829                                         * @since 1.0.0
     830                                         *
     831                                         * @param array  $array             Array holding permalink and content for notification.
     832                                         * @param int    $group_link        The permalink for the group.
     833                                         * @param string $group->name       Name of the group.
     834                                         * @param string $text              Notification content.
     835                                         * @param string $notification_link The permalink for notification.
     836                                         */
     837                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', array(
    589838                                                'link' => $notification_link,
    590839                                                'text' => $text
    591840                                        ), $group_link, $group->name, $text, $notification_link );
    function groups_format_notifications( $action, $item_id, $secondary_item_id, $to 
    598847                        $group_id = $item_id;
    599848                        $group = groups_get_group( array( 'group_id' => $group_id ) );
    600849                        $group_link = bp_get_group_permalink( $group );
     850                        $amount = 'single';
    601851
    602852                        $notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '/invites/?n=1';
    603853
    604854                        if ( (int) $total_items > 1 ) {
    605855                                $text = sprintf( __( 'You have %d new group invitations', 'buddypress' ), (int) $total_items );
    606                                 $filter = 'bp_groups_multiple_group_invite_notification';
     856                                $amount = 'multiple';
    607857
    608858                                if ( 'string' == $format ) {
    609                                         return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Group Invites', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
     859                                        /**
     860                                         * Filters multiple group invitation notification for string format.
     861                                         * Complete filter - bp_groups_multiple_group_invite_notification.
     862                                         *
     863                                         * @since 1.0.0
     864                                         *
     865                                         * @param string $string            HTML anchor tag for notification.
     866                                         * @param int    $total_items       Total number of rejected requests.
     867                                         * @param string $text              Notification content.
     868                                         * @param string $notification_link The permalink for notification.
     869                                         */
     870                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '" title="' . __( 'Group Invites', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
    610871                                } else {
    611                                         return apply_filters( $filter, array(
     872                                        /**
     873                                         * Filters multiple group invitation notification for non-string format.
     874                                         * Complete filter - bp_groups_multiple_group_invite_notification.
     875                                         *
     876                                         * @since 1.0.0
     877                                         *
     878                                         * @param array  $array             Array holding permalink and content for notification.
     879                                         * @param int    $total_items       Total number of rejected requests.
     880                                         * @param string $text              Notification content.
     881                                         * @param string $notification_link The permalink for notification.
     882                                         */
     883                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', array(
    612884                                                'link' => $notification_link,
    613885                                                'text' => $text
    614886                                        ), $total_items, $text, $notification_link );
    function groups_format_notifications( $action, $item_id, $secondary_item_id, $to 
    618890                                $filter = 'bp_groups_single_group_invite_notification';
    619891
    620892                                if ( 'string' == $format ) {
    621                                         return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
     893                                        /**
     894                                         * Filters single group invitation notification for string format.
     895                                         * Complete filter - bp_groups_single_group_invite_notification.
     896                                         *
     897                                         * @since 1.0.0
     898                                         *
     899                                         * @param string $string            HTML anchor tag for notification.
     900                                         * @param int    $group_link        The permalink for the group.
     901                                         * @param string $group->name       Name of the group.
     902                                         * @param string $text              Notification content.
     903                                         * @param string $notification_link The permalink for notification.
     904                                         */
     905                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
    622906                                } else {
    623                                         return apply_filters( $filter, array(
     907                                        /**
     908                                         * Filters single group invitation notification for non-string format.
     909                                         * Complete filter - bp_groups_single_group_invite_notification.
     910                                         *
     911                                         * @since 1.0.0
     912                                         *
     913                                         * @param array  $array             Array holding permalink and content for notification.
     914                                         * @param int    $group_link        The permalink for the group.
     915                                         * @param string $group->name       Name of the group.
     916                                         * @param string $text              Notification content.
     917                                         * @param string $notification_link The permalink for notification.
     918                                         */
     919                                        return apply_filters( 'bp_group_' . $amount . '_' . $action . '_notification', array(
    624920                                                'link' => $notification_link,
    625921                                                'text' => $text
    626922                                        ), $group_link, $group->name, $text, $notification_link );