Docs: Clarify @param types on get_sample_permalink_html filter.

`$new_title` and `$new_slug` can be null if `get_sample_permalink_html()` 
was called with default parameters, and they are documented as 
`string|null` in the function DocBlock.

Follow-up to [34347].

Props Enchiridion, audrasjb, SergeyBiryukov.
Fixes #58322.
See #33927. --Cette ligne, et les 
suivantes 
ci-dessous, seront ignorées--

M    trunk/src/wp-admin/includes/post.php


git-svn-id: https://develop.svn.wordpress.org/trunk@55758 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras 2023-05-16 05:23:55 +00:00
parent f375b68447
commit 0b10d2fc06

View File

@ -1555,11 +1555,11 @@ function get_sample_permalink_html( $post, $new_title = null, $new_slug = null )
* @since 2.9.0
* @since 4.4.0 Added `$post` parameter.
*
* @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.
* @param string $return Sample permalink HTML markup.
* @param int $post_id Post ID.
* @param string|null $new_title New sample permalink title.
* @param string|null $new_slug New sample permalink slug.
* @param WP_Post $post Post object.
*/
$return = apply_filters( 'get_sample_permalink_html', $return, $post->ID, $new_title, $new_slug, $post );