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

Filters the permalink for a post.


Description

Only applies to posts with post_type of ‘post’.


Parameters

$permalink

(string) The post's permalink.

$post

(WP_Post) The post in question.

$leavename

(bool) Whether to keep the post name.


Source

File: wp-includes/link-template.php

View on GitHub



Changelog

Changelog
Version Description
WP-1.5.0 Introduced.