W3cubDocs

/WordPress

apply_filters( ‘get_sample_permalink’, array $permalink, int $post_id, string $title, string $name, WP_Post $post )

Filters the sample permalink.

Parameters

$permalinkarray
Array containing the sample permalink with placeholder for the post name, and the post name.
  • 0 string
    The permalink with placeholder for the post name.
  • 1 string
    The post name.
$post_idint
Post ID.
$titlestring
Post title.
$namestring
Post name (slug).
$postWP_Post
Post object.

Source

return apply_filters( 'get_sample_permalink', $permalink, $post->ID, $title, $name, $post );

Changelog

Version Description
4.4.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_sample_permalink