ap_base_page_slug()
Description #
Get slug of base page.
Changelog #
Source #
File: includes/functions.php
function ap_base_page_slug() { $slug = 'questions'; if ( ! empty( ap_opt( 'base_page' ) ) ) { $base_page = get_post( ap_opt( 'base_page' ) ); if ( $base_page ) { $slug = $base_page->post_name; if ( $base_page->post_parent > 0 ) { $parent_page = get_post( $base_page->post_parent ); $slug = $parent_page->post_name . '/' . $slug; } } } return apply_filters( 'ap_base_page_slug', $slug ); }
Expand full source code Collapse full source code View on GitHub: includes/functions.php:20
Add your comment