From 69c828b77b3f931042197a22eed8b9595138b8ba Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sat, 10 Oct 2015 05:46:24 +0000 Subject: [PATCH] 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 --- wp-includes/link-template.php | 6 ++++-- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index bfa9a53f9f..542ba1c7a4 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -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 ) ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index bf1b5b0d1e..9b3cdc8c58 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @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.