From 520a75f44e9b844a3ee3c4b4db234637de298cb5 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 20 Sep 2015 03:25:45 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@34347 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/post.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 224c1e97b9..ec2c3904e8 100644 --- a/src/wp-admin/includes/post.php +++ b/src/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; }