From d09f6ef81caed27d86798a044ecaf8cfd8ce604b Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 4 Nov 2015 18:28:31 +0000 Subject: [PATCH] Pages: Introduce the `get_page_uri` filter, which makes it possible to manipulate a given page's URI before it's returned from the like-named `get_page_uri()`. Props tanner-m for the initial patch. Fixes #15963. git-svn-id: https://develop.svn.wordpress.org/trunk@35510 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post-functions.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/post-functions.php b/src/wp-includes/post-functions.php index 2c4cda07ec..3933bbbc61 100644 --- a/src/wp-includes/post-functions.php +++ b/src/wp-includes/post-functions.php @@ -4288,7 +4288,15 @@ function get_page_uri( $page ) { } } - return $uri; + /** + * Filter the URI for a page. + * + * @since 4.4.0 + * + * @param string $uri Page URI. + * @param WP_Post $page Page object. + */ + return apply_filters( 'get_page_uri', $uri, $page ); } /**