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’.


Parameters

$permalink

The site's permalink structure.

$post

The post in question.

$leavename

Whether to keep the post name.


Source

File: wp-includes/link-template.php

View on GitHub



Changelog

Changelog
Version Description
WP-3.0.0 Introduced.