Filter hook 'pre_post_link'

in WP Core File wp-includes/link-template.php at line 217

Description

Filters the permalink structure for a post before token replacement occurs. Only applies to posts with post_type of 'post'.

Occurrences

Filename Line Number
wp-includes/link-template.php 217

Parameters

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

PHP Doc

/**
	 * Filters the permalink structure for a post before token replacement occurs.
	 *
	 * Only applies to posts with post_type of 'post'.
	 *
	 * @since 3.0.0
	 *
	 * @param string  $permalink The site's permalink structure.
	 * @param WP_Post $post      The post in question.
	 * @param bool    $leavename Whether to keep the post name.
	 */