Profile::sub_page_template()
Description #
Render sub page template.
Source #
File: addons/profile/profile.php
public function sub_page_template() { $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 ) ) { $current_page = $current_page[0]; // Callback. if ( isset( $current_page['cb'] ) && is_array( $current_page['cb'] ) && method_exists( $current_page['cb'][0], $current_page['cb'][1] ) ) { call_user_func( $current_page['cb'] ); } elseif ( function_exists( $current_page['cb'] ) ) { call_user_func( $current_page['cb'] ); } else { esc_attr_e( 'Callback function not found for rendering this page', 'anspress-question-answer' ); } } }
Expand full source code Collapse full source code View on GitHub: addons/profile/profile.php:338
Add your comment