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



post_link › WordPress Filter Hooks

Since1.5.0
Deprecatedn/a
apply_filters( 'post_link', $permalink, $post, $leavename )
Parameters: (3)
  • (string) $permalink 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
Defined at:
Codex:

Filters the permalink for a post.

Only applies to posts with post_type of 'post'.





Source

return apply_filters( 'post_link', $permalink, $post, $leavename );