wpseek.com
A WordPress-centric search engine for devs and theme authors



post_type_link › WordPress Filter Hooks

Since3.0.0
Deprecatedn/a
apply_filters( 'post_type_link', $post_link, $post, $leavename, $sample )
Parameters: (4)
  • (string) $post_link The post's permalink.
    Required: Yes
  • (WP_Post) $post The post in question.
    Required: Yes
  • (bool) $leavename Whether to keep the post name.
    Required: Yes
  • (bool) $sample Is it a sample permalink.
    Required: Yes
Defined at:
Codex:

Filters the permalink for a post of a custom post type.





Source

return apply_filters( 'post_type_link', $post_link, $post, $leavename, $sample );