ap_page( string $current_page = '' )
Description #
Output current AnsPress page.
Parameters #
- $current_pagestring (Optional) Pass current page to override. Default value: ''
Source #
File: includes/theme.php
function ap_page( $current_page = '' ) { $pages = anspress()->pages; if ( empty( $current_page ) ) { $current_page = ap_current_page(); $current_page = '' === $current_page ? 'base' : $current_page; } if ( isset( $pages[ $current_page ]['func'] ) ) { call_user_func( $pages[ $current_page ]['func'] ); } else { global $wp_query; $wp_query->set_404(); status_header( 404 ); include ap_get_theme_location( 'not-found.php' ); } }
Expand full source code Collapse full source code View on GitHub: includes/theme.php:213
Add your comment