ap_register_page( string $page_slug, string $page_title, callable $func, bool $show_in_menu = true, bool $is_private = false )
Description #
Register anspress pages.
Parameters #
- $page_slugstring (Required) slug for links.
- $page_titlestring (Required) Page title.
- $funccallable (Required) Hook to run when shortcode is found.
- $show_in_menubool (Optional) User can add this pages to their WordPress menu from appearance->menu->AnsPress. Default value: true
- $is_privatebool (Optional) Only show to currently logged in user. Default value: false
Source #
File: includes/theme.php
function ap_register_page( $page_slug, $page_title, $func, $show_in_menu = true, $is_private = false ) { anspress()->pages[ $page_slug ] = array( 'title' => $page_title, 'func' => $func, 'show_in_menu' => $show_in_menu, 'private' => $is_private, ); }
Expand full source code Collapse full source code View on GitHub: includes/theme.php:196
Add your comment