post_link хук-фильтр . WP 1.5.0
Filters the permalink for a post.
Only applies to posts with post_type of 'post'.
Использование
add_filter( 'post_link', 'filter_function_name_673', 10, 3 ); function filter_function_name_673( $permalink, $post, $leavename ){ // filter... return $permalink; }
- $permalink(строка)
- The post's permalink.
- $post(WP_Post)
- The post in question.
- $leavename(true/false)
- Whether to keep the post name.
Список изменений
С версии 1.5.0 | Введена. |
Где вызывается хук
wp-includes/link-template.php 252
return apply_filters( 'post_link', $permalink, $post, $leavename );