WPDev.one
Core Function
View Source on Trac ↗

get_sample_permalink()

get_sample_permalink( mixed $post, mixed $title = null, mixed $name = null )

Returns a sample permalink based on the post name.

Parameters 3 required

Name / Type Description
(int

| WP_Post) $post Post ID or post object.

Required
mixed

(string | null) $title Optional. Title to override the post's current title when generating the post name. Default null.

Required
(string

| null) $name Optional. Name to override the post name. Default null.

Required

Return Value

(array)
array { Array containing the sample permalink with placeholder for the post name, and the post name.

Function Information

Since Version
2.5.0
Source File
wp-admin/includes/post.php
Advertisement