Filters the permalink for a post of a custom post type.
$post_linkstring
$postWP_Post
$leavenamebool
$samplebool
post_type_link is a filter applied to the permalink URL for a post or custom post type prior to being returned by the function get_post_permalink() .
return apply_filters( 'post_type_link', $post_link, $post, $leavename, $sample );
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/post_type_link