mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-01 21:21:24 +01:00
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:
parent
c2b5aeebb0
commit
69c828b77b
@ -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 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user