Filter hook 'post_type_link'

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

Description

Filters the permalink for a post of a custom post type.

Occurrences

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

Parameters

Type Name Description
string $post_link The post's permalink.
WP_Post $post The post in question.
bool $leavename Whether to keep the post name.
bool $sample Is it a sample permalink.

PHP Doc

/**
	 * Filters the permalink for a post of a custom post type.
	 *
	 * @since 3.0.0
	 *
	 * @param string  $post_link The post's permalink.
	 * @param WP_Post $post      The post in question.
	 * @param bool    $leavename Whether to keep the post name.
	 * @param bool    $sample    Is it a sample permalink.
	 */