Changeset 13442 for trunk/src/bp-members/bp-members-template.php
- Timestamp:
- 03/27/2023 06:19:06 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-template.php
r13441 r13442 1953 1953 * 1954 1954 * @since 1.2.4 1955 */ 1956 function bp_loggedin_user_link() { 1957 echo esc_url( bp_loggedin_user_url() ); 1955 * @since 12.0.0 Introduced the `$chunk` argument. 1956 * 1957 * @param array $chunk A list of slugs to append to the URL. 1958 */ 1959 function bp_loggedin_user_link( $chunks = array() ) { 1960 $path_chunks = array(); 1961 $chunks = (array) $chunks; 1962 1963 if ( $chunks ) { 1964 $single_item_component = array_shift( $chunks ); 1965 if ( $single_item_component ) { 1966 $path_chunks['single_item_component'] = bp_rewrites_get_slug( 'members', 'member_' . $single_item_component, $single_item_component ); 1967 } 1968 1969 $single_item_action = array_shift( $chunks ); 1970 if ( $single_item_action ) { 1971 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 'members', 'member_' . $single_item_component . '_' . $single_item_action, $single_item_action ); 1972 } 1973 1974 if ( $chunks ) { 1975 foreach ( $chunks as $chunk ) { 1976 $path_chunks['single_item_action_variables'][] = bp_rewrites_get_slug( 'members', 'member_' . $single_item_component . '_' . $single_item_action . '_' . $chunk, $chunk ); 1977 } 1978 } 1979 } 1980 1981 echo esc_url( bp_loggedin_user_url( $path_chunks ) ); 1958 1982 } 1959 1983
Note: See TracChangeset
for help on using the changeset viewer.