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

Props chriscct7.
Fixes #34234. See #23882.


git-svn-id: https://develop.svn.wordpress.org/trunk@35002 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes 2015-10-10 05:45:27 +00:00
parent ed4b0aee3f
commit 48ceecafc7

View File

@ -19,10 +19,12 @@ function the_permalink( $post = 0 ) {
* Filter the display of the permalink for the current post.
*
* @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 ) );
}
/**