bbp_get_page_by_path( string $path = '' )

Used to guess if page exists at requested path


Description Description


Parameters Parameters

$path

(Optional)

Default value: ''


Top ↑

Return Return

(mixed) False if no page, Page object if true


Top ↑

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 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.