From 82709c30d9a986f24a04064b976dcf54d80c3cc0 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 20 Sep 2015 03:26:25 +0000 Subject: [PATCH] =?UTF-8?q?The=20`'get=5Fsample=5Fpermalink=5Fhtml'`=20fil?= =?UTF-8?q?ter=E2=80=8B's=20second=20parameter=20can=20be=20a=20post=20ID?= =?UTF-8?q?=20or=20a=20post=20object.=20This=20is=20confusing.=20We=20shou?= =?UTF-8?q?ld=20pass=20the=20post=20ID=20and=20post=20object=20separately,?= =?UTF-8?q?=20for=20consistency=20with=20`'get=5Fsample=5Fpermalink'`=20fi?= =?UTF-8?q?lter=20added=20in=20[34309].?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Props SergeyBiryukov. Fixes #33927. Built from https://develop.svn.wordpress.org/trunk@34347 git-svn-id: http://core.svn.wordpress.org/trunk@34311 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 12 +++++++----- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 224c1e97b9..ec2c3904e8 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1350,13 +1350,15 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { * Filter the sample permalink HTML markup. * * @since 2.9.0 + * @since 4.4.0 Added `$post` parameter. * - * @param string $return Sample permalink HTML markup. - * @param int|WP_Post $id Post object or ID. - * @param string $new_title New sample permalink title. - * @param string $new_slug New sample permalink slug. + * @param string $return Sample permalink HTML markup. + * @param int $post_id Post ID. + * @param string $new_title New sample permalink title. + * @param string $new_slug New sample permalink slug. + * @param WP_Post $post Post object. */ - $return = apply_filters( 'get_sample_permalink_html', $return, $id, $new_title, $new_slug ); + $return = apply_filters( 'get_sample_permalink_html', $return, $post->ID, $new_title, $new_slug, $post ); return $return; } diff --git a/wp-includes/version.php b/wp-includes/version.php index f5d8b3e9ae..293b0c2df6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34346'; +$wp_version = '4.4-alpha-34347'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.