WordPress开发者和主题制作者的搜索引擎



pre_post_link ›

Since3.0.0
已弃用n/a
apply_filters( 'pre_post_link', $permalink, $post, $leavename )
参数: (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
定义在:
文档:

Filters the permalink structure for a post before token replacement occurs.

Only applies to posts with post_type of 'post'.





源码

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