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
This commit is contained in:
Drew Jaynes 2015-11-04 18:29:25 +00:00
parent d763eb80b7
commit 3575214485
2 changed files with 10 additions and 2 deletions

View File

@ -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 );
} }
/** /**

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.