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



pre_post_link › WordPress Filter Hooks

Since3.0.0
Deprecatedn/a
apply_filters( 'pre_post_link', $permalink, $post, $leavename )
Parameters: (3)
  • (string) $permalink The site's permalink structure.
    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 structure for a post before token replacement occurs.

Only applies to posts with post_type of 'post'.





Source

$permalink = apply_filters( 'pre_post_link', $permalink, $post, $leavename );