bbp_get_page_by_path( string $path = '' )
Used to guess if page exists at requested path
Description Description
Parameters Parameters
- $path
-
(Optional)
Default value: ''
Return Return
(mixed) False if no page, Page object if true
Source Source
File: includes/common/functions.php
function bbp_get_page_by_path( $path = '' ) { // Default to false $retval = false; // Path is not empty if ( ! empty( $path ) ) { // Pretty permalinks are on so path might exist if ( get_option( 'permalink_structure' ) ) { $retval = get_page_by_path( $path ); } } // Filter & return return apply_filters( 'bbp_get_page_by_path', $retval, $path ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |