From 357521448597c97d941271144f3e3d206488323f Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 4 Nov 2015 18:29:25 +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. Built from https://develop.svn.wordpress.org/trunk@35510 git-svn-id: http://core.svn.wordpress.org/trunk@35474 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-functions.php | 10 +++++++++- wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/wp-includes/post-functions.php b/wp-includes/post-functions.php index 2c4cda07ec..3933bbbc61 100644 --- a/wp-includes/post-functions.php +++ b/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 ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 5fd14ad99d..7cac3fd489 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-beta2-35509'; +$wp_version = '4.4-beta2-35510'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.