apply_filters( 'pre_post_link', string $permalink, WP_Post $post, bool $leavename )

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


Description

Only applies to posts with post_type of ‘post’.


Top ↑

Parameters

$permalink string
The site's permalink structure.
$post WP_Post
The post in question.
$leavename bool
Whether to keep the post name.

Top ↑

Source

File: wp-includes/link-template.php. View all references

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


Top ↑

Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.