Ticket #7448: 7448.02.patch
File 7448.02.patch, 12.5 KB (added by , 7 years ago) |
---|
-
src/bp-activity/bp-activity-template.php
2090 2090 * activity comment. 2091 2091 */ 2092 2092 function bp_get_activity_comment_delete_link() { 2093 $link = wp_nonce_url( bp_get_activity_directory_permalink() . 'delete/' . bp_get_activity_comment_id() . '?cid=' . bp_get_activity_comment_id(), 'bp_activity_delete_link' );2093 $link = wp_nonce_url( trailingslashit( bp_get_activity_directory_permalink() . 'delete/' . bp_get_activity_comment_id() ) . '?cid=' . bp_get_activity_comment_id(), 'bp_activity_delete_link' ); 2094 2094 2095 2095 /** 2096 2096 * Filters the link used for deleting the activity comment currently being displayed. -
src/bp-friends/bp-friends-template.php
563 563 * @param string $value Accept-friendship URL. 564 564 * @param int $friendship_id ID of the friendship. 565 565 */ 566 return apply_filters( 'bp_get_friend_accept_request_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/accept/' . $friendship_id, 'friends_accept_friendship' ), $friendship_id );566 return apply_filters( 'bp_get_friend_accept_request_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/accept/' . $friendship_id ), 'friends_accept_friendship' ), $friendship_id ); 567 567 } 568 568 569 569 /** … … 598 598 * @param string $value Reject-friendship URL. 599 599 * @param int $friendship_id ID of the friendship. 600 600 */ 601 return apply_filters( 'bp_get_friend_reject_request_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/reject/' . $friendship_id, 'friends_reject_friendship' ), $friendship_id );601 return apply_filters( 'bp_get_friend_reject_request_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/reject/' . $friendship_id ), 'friends_reject_friendship' ), $friendship_id ); 602 602 } 603 603 604 604 /** -
src/bp-groups/bp-groups-template.php
1800 1800 * @param string $value Permalink of the Members page for the current group. 1801 1801 * @param object $group Group object. 1802 1802 */ 1803 return apply_filters( 'bp_get_group_all_members_permalink', bp_get_group_permalink( $group ) . 'members', $group );1803 return apply_filters( 'bp_get_group_all_members_permalink', trailingslashit( bp_get_group_permalink( $group ) . 'members' ), $group ); 1804 1804 } 1805 1805 1806 1806 /** … … 2060 2060 * @param string $value URL permalink for the Forum Page. 2061 2061 * @param object $group Group object. 2062 2062 */ 2063 return apply_filters( 'bp_get_group_forum_permalink', bp_get_group_permalink( $group ) . 'forum', $group );2063 return apply_filters( 'bp_get_group_forum_permalink', trailingslashit( bp_get_group_permalink( $group ) . 'forum' ), $group ); 2064 2064 } 2065 2065 2066 2066 /** … … 2620 2620 * 2621 2621 * @param string $value URL to use for promoting a user to moderator. 2622 2622 */ 2623 return apply_filters( 'bp_get_group_member_promote_mod_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/promote/mod/' . $user_id, 'groups_promote_member' ) );2623 return apply_filters( 'bp_get_group_member_promote_mod_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'admin/manage-members/promote/mod/' . $user_id ), 'groups_promote_member' ) ); 2624 2624 } 2625 2625 2626 2626 /** … … 2663 2663 * 2664 2664 * @param string $value URL to use for promoting a user to admin. 2665 2665 */ 2666 return apply_filters( 'bp_get_group_member_promote_admin_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/promote/admin/' . $user_id, 'groups_promote_member' ) );2666 return apply_filters( 'bp_get_group_member_promote_admin_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'admin/manage-members/promote/admin/' . $user_id ), 'groups_promote_member' ) ); 2667 2667 } 2668 2668 2669 2669 /** … … 2713 2713 * @param string $value URL to use for demoting a user to member. 2714 2714 * @param object $group Group object. 2715 2715 */ 2716 return apply_filters( 'bp_get_group_member_demote_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/demote/' . $user_id, 'groups_demote_member' ), $group );2716 return apply_filters( 'bp_get_group_member_demote_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'admin/manage-members/demote/' . $user_id ), 'groups_demote_member' ), $group ); 2717 2717 } 2718 2718 2719 2719 /** … … 2757 2757 * 2758 2758 * @param string $value URL to use for banning a member. 2759 2759 */ 2760 return apply_filters( 'bp_get_group_member_ban_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/ban/' . $user_id, 'groups_ban_member' ) );2760 return apply_filters( 'bp_get_group_member_ban_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'admin/manage-members/ban/' . $user_id ), 'groups_ban_member' ) ); 2761 2761 } 2762 2762 2763 2763 /** … … 2805 2805 * 2806 2806 * @param string $value URL to use for unbanning a member. 2807 2807 */ 2808 return apply_filters( 'bp_get_group_member_unban_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/unban/' . $user_id, 'groups_unban_member' ) );2808 return apply_filters( 'bp_get_group_member_unban_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'admin/manage-members/unban/' . $user_id ), 'groups_unban_member' ) ); 2809 2809 } 2810 2810 2811 2811 /** … … 2851 2851 * @param string $value URL to use for removing a member. 2852 2852 * @param object $group Group object. 2853 2853 */ 2854 return apply_filters( 'bp_get_group_member_remove_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/remove/' . $user_id, 'groups_remove_member' ), $group );2854 return apply_filters( 'bp_get_group_member_remove_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'admin/manage-members/remove/' . $user_id ), 'groups_remove_member' ), $group ); 2855 2855 } 2856 2856 2857 2857 /** … … 2978 2978 * @param string $value Action attribute for a group form. 2979 2979 * @param object $group Group object. 2980 2980 */ 2981 return apply_filters( 'bp_group_form_action', bp_get_group_permalink( $group ) . $page, $group );2981 return apply_filters( 'bp_group_form_action', trailingslashit( bp_get_group_permalink( $group ) . $page ), $group ); 2982 2982 } 2983 2983 2984 2984 /** … … 3021 3021 * @param string $value Action attribute for a group admin form. 3022 3022 * @param object $group Group object. 3023 3023 */ 3024 return apply_filters( 'bp_group_admin_form_action', bp_get_group_permalink( $group ) . 'admin/' . $page, $group );3024 return apply_filters( 'bp_group_admin_form_action', trailingslashit( bp_get_group_permalink( $group ) . 'admin/' . $page ), $group ); 3025 3025 } 3026 3026 3027 3027 /** … … 3283 3283 * @param string $value URL for confirming a request to leave a group. 3284 3284 * @param object $group Group object. 3285 3285 */ 3286 return apply_filters( 'bp_group_leave_confirm_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group/yes', 'groups_leave_group' ), $group );3286 return apply_filters( 'bp_group_leave_confirm_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'leave-group/yes' ), 'groups_leave_group' ), $group ); 3287 3287 } 3288 3288 3289 3289 /** … … 3355 3355 * @param string $value Action attribute for a group send invite form. 3356 3356 * @param object $group Group object. 3357 3357 */ 3358 return apply_filters( 'bp_group_send_invite_form_action', bp_get_group_permalink( $group ) . 'send-invites/send', $group );3358 return apply_filters( 'bp_group_send_invite_form_action', trailingslashit( bp_get_group_permalink( $group ) . 'send-invites/send' ), $group ); 3359 3359 } 3360 3360 3361 3361 /** … … 3494 3494 'block_self' => false, 3495 3495 'wrapper_class' => 'group-button ' . $group->status, 3496 3496 'wrapper_id' => 'groupbutton-' . $group->id, 3497 'link_href' => wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ),3497 'link_href' => wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'leave-group' ), 'groups_leave_group' ), 3498 3498 'link_text' => __( 'Leave Group', 'buddypress' ), 3499 3499 'link_class' => 'group-button leave-group', 3500 3500 ); … … 3515 3515 'block_self' => false, 3516 3516 'wrapper_class' => 'group-button ' . $group->status, 3517 3517 'wrapper_id' => 'groupbutton-' . $group->id, 3518 'link_href' => wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ),3518 'link_href' => wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'join' ), 'groups_join_group' ), 3519 3519 'link_text' => __( 'Join Group', 'buddypress' ), 3520 3520 'link_class' => 'group-button join-group', 3521 3521 ); … … 3563 3563 'block_self' => false, 3564 3564 'wrapper_class' => 'group-button ' . $group->status, 3565 3565 'wrapper_id' => 'groupbutton-' . $group->id, 3566 'link_href' => wp_nonce_url( bp_get_group_permalink( $group ) . 'request-membership', 'groups_request_membership' ),3566 'link_href' => wp_nonce_url( trailingslashit( bp_get_group_permalink( $group ) . 'request-membership' ), 'groups_request_membership' ), 3567 3567 'link_text' => __( 'Request Membership', 'buddypress' ), 3568 3568 'link_class' => 'group-button request-membership', 3569 3569 ); … … 5505 5505 * 5506 5506 * @param string $value URL to delete the group avatar. 5507 5507 */ 5508 return apply_filters( 'bp_get_group_avatar_delete_link', wp_nonce_url( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/group-avatar/delete', 'bp_group_avatar_delete' ) );5508 return apply_filters( 'bp_get_group_avatar_delete_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/group-avatar/delete' ), 'bp_group_avatar_delete' ) ); 5509 5509 } 5510 5510 5511 5511 /** … … 5636 5636 * 5637 5637 * @param string $value URL to use to reject a membership request. 5638 5638 */ 5639 return apply_filters( 'bp_get_group_request_reject_link', wp_nonce_url( bp_get_group_permalink( groups_get_current_group() ) . 'admin/membership-requests/reject/' . $requests_template->request->membership_id, 'groups_reject_membership_request' ) );5639 return apply_filters( 'bp_get_group_request_reject_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( groups_get_current_group() ) . 'admin/membership-requests/reject/' . $requests_template->request->membership_id ), 'groups_reject_membership_request' ) ); 5640 5640 } 5641 5641 5642 5642 /** … … 5660 5660 * 5661 5661 * @param string $value URL to use to accept a membership request. 5662 5662 */ 5663 return apply_filters( 'bp_get_group_request_accept_link', wp_nonce_url( bp_get_group_permalink( groups_get_current_group() ) . 'admin/membership-requests/accept/' . $requests_template->request->membership_id, 'groups_accept_membership_request' ) );5663 return apply_filters( 'bp_get_group_request_accept_link', wp_nonce_url( trailingslashit( bp_get_group_permalink( groups_get_current_group() ) . 'admin/membership-requests/accept/' . $requests_template->request->membership_id ), 'groups_accept_membership_request' ) ); 5664 5664 } 5665 5665 5666 5666 /** … … 5982 5982 if ( bp_is_current_action( 'create' ) ) { 5983 5983 $uninvite_url = bp_get_groups_directory_permalink() . 'create/step/group-invites/?user_id=' . $user_id; 5984 5984 } else { 5985 $uninvite_url = bp_get_group_permalink( groups_get_current_group() ) . 'send-invites/remove/' . $user_id;5985 $uninvite_url = trailingslashit( bp_get_group_permalink( groups_get_current_group() ) . 'send-invites/remove/' . $user_id ); 5986 5986 } 5987 5987 5988 5988 return wp_nonce_url( $uninvite_url, 'groups_invite_uninvite_user' ); -
src/bp-messages/bp-messages-template.php
1163 1163 * @param string $value URL for deleting the current notice. 1164 1164 * @param string $value Text indicating action being executed. 1165 1165 */ 1166 return apply_filters( 'bp_get_message_notice_delete_link', wp_nonce_url( bp_displayed_user_domain() . bp_get_messages_slug() . '/notices/delete/' . $messages_template->thread->id, 'messages_delete_thread' ) );1166 return apply_filters( 'bp_get_message_notice_delete_link', wp_nonce_url( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/notices/delete/' . $messages_template->thread->id ), 'messages_delete_thread' ) ); 1167 1167 } 1168 1168 1169 1169 /**