Changeset 13441 for trunk/src/bp-groups/bp-groups-template.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-template.php
r13437 r13441 1274 1274 1275 1275 if ( $slug ) { 1276 $supported_chunks = array_fill_keys( array( 'single_item_ component', 'single_item_action', 'single_item_action_variables' ), true );1276 $supported_chunks = array_fill_keys( array( 'single_item_action', 'single_item_action_variables' ), true ); 1277 1277 $path_chunks = bp_parse_args( 1278 1278 array_intersect_key( $path_chunks, $supported_chunks ), … … 3341 3341 } 3342 3342 3343 $views = bp_get_group_screens( 'manage' ); 3344 if ( isset( $views[ $page ]['rewrite_id'] ) ) { 3345 $page = bp_rewrites_get_slug( 'groups', $views[ $page ]['rewrite_id'], $page ); 3346 } 3347 3348 $url = bp_get_group_url( 3349 $group, 3350 array( 3351 'single_item_action' => bp_rewrites_get_slug( 'groups', 'bp_group_read_admin', 'admin' ), 3352 'single_item_action_variables' => $page, 3353 ) 3354 ); 3355 3343 3356 /** 3344 3357 * Filters the 'action' attribute for a group admin form. … … 3348 3361 * @since 10.0.0 Added the `$page` parameter. 3349 3362 * 3350 * @param string $ valueAction attribute for a group admin form.3363 * @param string $url Action attribute for a group admin form. 3351 3364 * @param BP_Groups_Group $group The group object. 3352 3365 * @param int|string|bool $page Page slug. 3353 3366 */ 3354 return apply_filters( 'bp_group_admin_form_action', trailingslashit( bp_get_group_permalink( $group ) . 'admin/' . $page ), $group, $page );3367 return apply_filters( 'bp_group_admin_form_action', $url, $group, $page ); 3355 3368 } 3356 3369 … … 3526 3539 } 3527 3540 3528 $user_domain = bp_loggedin_user_domain(); 3541 $groups_slug = bp_get_groups_slug(); 3542 $path_chunks = array( 3543 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $groups_slug, $groups_slug ), 3544 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $groups_slug . '_invites', 'invites' ), 3545 'single_item_action_variables' => array( bp_rewrites_get_slug( 'members', 'member_' . $groups_slug . '_invites_accept', 'accept' ), $group->id ), 3546 ); 3547 3529 3548 if ( bp_is_user() ) { 3530 $user_domain = bp_displayed_user_domain(); 3531 } 3549 $user_domain = bp_displayed_user_url( $path_chunks ); 3550 } else { 3551 $user_domain = bp_loggedin_user_url( $path_chunks ); 3552 } 3553 3554 $url = wp_nonce_url( $user_domain, 'groups_accept_invite' ); 3532 3555 3533 3556 /** … … 3537 3560 * @since 2.5.0 Added the `$group` parameter. 3538 3561 * 3539 * @param string $ valueURL for accepting an invitation to a group.3562 * @param string $url URL for accepting an invitation to a group. 3540 3563 * @param object $group Group object. 3541 3564 */ 3542 return apply_filters( 'bp_get_group_accept_invite_link', wp_nonce_url( trailingslashit( $user_domain . bp_get_groups_slug() . '/invites/accept/' . $group->id ), 'groups_accept_invite' ), $group );3565 return apply_filters( 'bp_get_group_accept_invite_link', $url, $group ); 3543 3566 } 3544 3567 … … 3567 3590 } 3568 3591 3569 $user_domain = bp_loggedin_user_domain(); 3592 $groups_slug = bp_get_groups_slug(); 3593 $path_chunks = array( 3594 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $groups_slug, $groups_slug ), 3595 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $groups_slug . '_invites', 'invites' ), 3596 'single_item_action_variables' => array( bp_rewrites_get_slug( 'members', 'member_' . $groups_slug . '_invites_reject', 'reject' ), $group->id ), 3597 ); 3598 3570 3599 if ( bp_is_user() ) { 3571 $user_domain = bp_displayed_user_domain(); 3572 } 3600 $user_domain = bp_displayed_user_url( $path_chunks ); 3601 } else { 3602 $user_domain = bp_loggedin_user_url( $path_chunks ); 3603 } 3604 3605 $url = wp_nonce_url( $user_domain, 'groups_reject_invite' ); 3573 3606 3574 3607 /** … … 3578 3611 * @since 2.5.0 Added the `$group` parameter. 3579 3612 * 3580 * @param string $ valueURL for rejecting an invitation to a group.3613 * @param string $url URL for rejecting an invitation to a group. 3581 3614 * @param object $group Group object. 3582 3615 */ 3583 return apply_filters( 'bp_get_group_reject_invite_link', wp_nonce_url( trailingslashit( $user_domain . bp_get_groups_slug() . '/invites/reject/' . $group->id ), 'groups_reject_invite' ), $group );3616 return apply_filters( 'bp_get_group_reject_invite_link', $url, $group ); 3584 3617 } 3585 3618
Note: See TracChangeset
for help on using the changeset viewer.