Changeset 13441 for trunk/src/bp-groups/bp-groups-notifications.php
- Timestamp:
- 03/23/2023 07:35:38 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-notifications.php
r13437 r13441 531 531 $group_id = $item_id; 532 532 533 $group = groups_get_group( $group_id ); 534 $group_link = bp_get_group_url( $group ); 535 $amount = 'single'; 533 $group = groups_get_group( $group_id ); 534 $group_link = bp_get_group_url( $group ); 535 $groups_slug = bp_get_groups_slug(); 536 $custom_groups_slug = bp_rewrites_get_slug( 'members', 'member_' . $groups_slug, $groups_slug ); 537 $amount = 'single'; 536 538 537 539 if ( (int) $total_items > 1 ) { … … 539 541 $text = sprintf( __( '%1$d accepted group membership requests for the group "%2$s"', 'buddypress' ), (int) $total_items, $group->name ); 540 542 $amount = 'multiple'; 541 $notification_link = trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ) . '?n=1'; 543 $notification_link = add_query_arg( 544 'n', 545 1, 546 bp_loggedin_user_url( 547 array( 548 'single_item_component' => $custom_groups_slug, 549 ) 550 ) 551 ); 542 552 543 553 if ( 'string' == $format ) { … … 622 632 $group_id = $item_id; 623 633 624 $group = groups_get_group( $group_id ); 625 $group_link = bp_get_group_url( $group ); 626 $amount = 'single'; 634 $group = groups_get_group( $group_id ); 635 $group_link = bp_get_group_url( $group ); 636 $groups_slug = bp_get_groups_slug(); 637 $custom_groups_slug = bp_rewrites_get_slug( 'members', 'member_' . $groups_slug, $groups_slug ); 638 $amount = 'single'; 627 639 628 640 if ( (int) $total_items > 1 ) { … … 630 642 $text = sprintf( __( '%1$d rejected group membership requests for the group "%2$s"', 'buddypress' ), (int) $total_items, $group->name ); 631 643 $amount = 'multiple'; 632 $notification_link = trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ) . '?n=1'; 644 $notification_link = add_query_arg( 645 'n', 646 1, 647 bp_loggedin_user_url( 648 array( 649 'single_item_component' => $custom_groups_slug, 650 ) 651 ) 652 ); 633 653 634 654 if ( 'string' == $format ) { … … 712 732 $group_id = $item_id; 713 733 714 $group = groups_get_group( $group_id ); 715 $group_link = bp_get_group_url( $group ); 716 $amount = 'single'; 734 $group = groups_get_group( $group_id ); 735 $group_link = bp_get_group_url( $group ); 736 $groups_slug = bp_get_groups_slug(); 737 $custom_groups_slug = bp_rewrites_get_slug( 'members', 'member_' . $groups_slug, $groups_slug ); 738 $amount = 'single'; 717 739 718 740 if ( (int) $total_items > 1 ) { … … 720 742 $text = sprintf( __( 'You were promoted to an admin in %d groups', 'buddypress' ), (int) $total_items ); 721 743 $amount = 'multiple'; 722 $notification_link = trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ) . '?n=1'; 744 $notification_link = add_query_arg( 745 'n', 746 1, 747 bp_loggedin_user_url( 748 array( 749 'single_item_component' => $custom_groups_slug, 750 ) 751 ) 752 ); 723 753 724 754 if ( 'string' == $format ) { … … 796 826 $group_id = $item_id; 797 827 798 $group = groups_get_group( $group_id ); 799 $group_link = bp_get_group_url( $group ); 800 $amount = 'single'; 828 $group = groups_get_group( $group_id ); 829 $group_link = bp_get_group_url( $group ); 830 $groups_slug = bp_get_groups_slug(); 831 $custom_groups_slug = bp_rewrites_get_slug( 'members', 'member_' . $groups_slug, $groups_slug ); 832 $amount = 'single'; 801 833 802 834 if ( (int) $total_items > 1 ) { … … 804 836 $text = sprintf( __( 'You were promoted to a mod in %d groups', 'buddypress' ), (int) $total_items ); 805 837 $amount = 'multiple'; 806 $notification_link = trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() ) . '?n=1'; 838 $notification_link = add_query_arg( 839 'n', 840 1, 841 bp_loggedin_user_url( 842 array( 843 'single_item_component' => $custom_groups_slug, 844 ) 845 ) 846 ); 807 847 808 848 if ( 'string' == $format ) { … … 878 918 879 919 case 'group_invite': 880 $group_id = $item_id; 881 $group = groups_get_group( $group_id ); 882 $group_link = bp_get_group_url( $group ); 883 $amount = 'single'; 884 885 $notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '/invites/?n=1'; 920 $group_id = $item_id; 921 $group = groups_get_group( $group_id ); 922 $group_link = bp_get_group_url( $group ); 923 $groups_slug = bp_get_groups_slug(); 924 $custom_groups_slug = bp_rewrites_get_slug( 'members', 'member_' . $groups_slug, $groups_slug ); 925 $amount = 'single'; 926 $notification_link = add_query_arg( 927 'n', 928 1, 929 bp_loggedin_user_url( 930 array( 931 'single_item_component' => $custom_groups_slug, 932 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $groups_slug . '_invites', 'invites' ), 933 ) 934 ) 935 ); 886 936 887 937 if ( (int) $total_items > 1 ) {
Note: See TracChangeset
for help on using the changeset viewer.