diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 8573e5322b..ebb1ca67fe 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -10,8 +10,11 @@ * Display the permalink for the current post. * * @since 1.2.0 + * @since 4.4.0 Added `$id` parameter. + * + * @param int|WP_Post $id Optional. Post ID or post object. Default current post. */ -function the_permalink() { +function the_permalink( $id = 0 ) { /** * Filter the display of the permalink for the current post. * @@ -19,7 +22,7 @@ function the_permalink() { * * @param string $permalink The permalink for the current post. */ - echo esc_url( apply_filters( 'the_permalink', get_permalink() ) ); + echo esc_url( apply_filters( 'the_permalink', get_permalink( $id ) ) ); } /** @@ -91,7 +94,7 @@ function permalink_anchor( $mode = 'id' ) { * * @see get_permalink() * - * @param int|WP_Post $id Optional. Post ID or post object. Default is the current post. + * @param int|WP_Post $id Optional. Post ID or post object. Default current post. * @param bool $leavename Optional. Whether to keep post name or page name. Default false. * @return string|false The permalink URL or false if post does not exist. */ diff --git a/wp-includes/version.php b/wp-includes/version.php index deab0a8e6c..219aeff05a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34981'; +$wp_version = '4.4-alpha-34982'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.