Changeset 13503 for trunk/src/bp-groups/bp-groups-template.php
- Timestamp:
- 06/18/2023 04:11:04 AM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-groups/bp-groups-template.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r13496 r13503 2945 2945 function bp_get_group_form_action( $page, $group = false ) { 2946 2946 $group = bp_get_group( $group ); 2947 $url = ''; 2947 2948 2948 2949 if ( empty( $group->id ) || empty( $page ) ) { 2949 return '';2950 return $url; 2950 2951 } 2951 2952 2952 2953 $screens = bp_get_group_screens( 'read' ); 2953 2954 if ( isset( $screens[ $page ]['rewrite_id'] ) ) { 2954 $page = bp_rewrites_get_slug( 'groups', $screens[ $page ]['rewrite_id'], $page ); 2955 } 2956 2957 $url = bp_get_group_url( 2958 $group, 2959 array( 2960 'single_item_action' => $page, 2961 ) 2962 ); 2955 $url = bp_get_group_url( 2956 $group, 2957 bp_groups_get_path_chunks( array( $page ) ) 2958 ); 2959 } 2963 2960 2964 2961 /** … … 3001 2998 function bp_get_group_admin_form_action( $page = false, $group = false ) { 3002 2999 $group = bp_get_group( $group ); 3000 $url = ''; 3003 3001 3004 3002 if ( empty( $group->id ) ) { 3005 return '';3003 return $url; 3006 3004 } 3007 3005 … … 3012 3010 $screens = bp_get_group_screens( 'manage' ); 3013 3011 if ( isset( $screens[ $page ]['rewrite_id'] ) ) { 3014 $page = bp_rewrites_get_slug( 'groups', $screens[ $page ]['rewrite_id'], $page ); 3015 } 3016 3017 $url = bp_get_group_url( 3018 $group, 3019 array( 3020 'single_item_action' => bp_rewrites_get_slug( 'groups', 'bp_group_read_admin', 'admin' ), 3021 'single_item_action_variables' => $page, 3022 ) 3023 ); 3012 $url = bp_get_group_manage_url( 3013 $group, 3014 bp_groups_get_path_chunks( array( $page ), 'manage' ) 3015 ); 3016 } 3024 3017 3025 3018 /** … … 3212 3205 } 3213 3206 3214 $groups_slug = bp_get_groups_slug(); 3215 $path_chunks = array( 3216 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $groups_slug, $groups_slug ), 3217 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $groups_slug . '_invites', 'invites' ), 3218 'single_item_action_variables' => array( bp_rewrites_get_slug( 'members', 'member_' . $groups_slug . '_invites_accept', 'accept' ), $group->id ), 3219 ); 3207 $path_chunks = bp_members_get_path_chunks( array( bp_get_groups_slug(), 'invites', array( 'accept', $group->id ) ) ); 3220 3208 3221 3209 if ( bp_is_user() ) { … … 3265 3253 } 3266 3254 3267 $groups_slug = bp_get_groups_slug(); 3268 $path_chunks = array( 3269 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $groups_slug, $groups_slug ), 3270 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $groups_slug . '_invites', 'invites' ), 3271 'single_item_action_variables' => array( bp_rewrites_get_slug( 'members', 'member_' . $groups_slug . '_invites_reject', 'reject' ), $group->id ), 3272 ); 3255 $path_chunks = bp_members_get_path_chunks( array( bp_get_groups_slug(), 'invites', array( 'reject', $group->id ) ) ); 3273 3256 3274 3257 if ( bp_is_user() ) {
Note: See TracChangeset
for help on using the changeset viewer.