Template: Pass the `$post` parameter to the `the_permalink` filter.

Props chriscct7.
Fixes #34234. See #23882.

Built from https://develop.svn.wordpress.org/trunk@35002


git-svn-id: http://core.svn.wordpress.org/trunk@34967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2015-10-10 05:46:24 +00:00
parent c2b5aeebb0
commit 69c828b77b
2 changed files with 5 additions and 3 deletions

View File

@ -19,10 +19,12 @@ function the_permalink( $post = 0 ) {
* Filter the display of the permalink for the current post. * Filter the display of the permalink for the current post.
* *
* @since 1.5.0 * @since 1.5.0
* @since 4.4.0 Added the `$post` parameter.
* *
* @param string $permalink The permalink for the current post. * @param string $permalink The permalink for the current post.
* @param int|WP_Post $post Post ID, WP_Post object, or 0. Default 0.
*/ */
echo esc_url( apply_filters( 'the_permalink', get_permalink( $post ) ) ); echo esc_url( apply_filters( 'the_permalink', get_permalink( $post ), $post ) );
} }
/** /**

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.4-alpha-35001'; $wp_version = '4.4-alpha-35002';
/** /**
* 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.