Profile::ap_breadcrumbs( array $navs )
Description #
Hook into AnsPress breadcrums to show user profile page.
Parameters #
- $navsarray (Required) Breadcrumbs navs.
Source #
File: addons/profile/profile.php
public function ap_breadcrumbs( $navs ) { if ( 'user' === ap_current_page() ) { $navs['page'] = array( 'title' => ap_user_display_name( ap_current_user_id() ), 'link' => ap_user_link( ap_current_user_id() ), 'order' => 8, ); $current = get_query_var( 'user_page', ap_opt( 'user_page_slug_questions' ) ); $current_page = ap_search_array( anspress()->user_pages, 'rewrite', $current ); if ( ! empty( $current_page ) ) { $navs['user'] = array( 'title' => $current_page[0]['label'], 'link' => ap_user_link( ap_current_user_id() ) . $current . '/', 'order' => 8, ); } } return $navs; }
Expand full source code Collapse full source code View on GitHub: addons/profile/profile.php:313
Add your comment