Filter hook 'get_canonical_url'

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

Description

Filters the canonical URL for a post.

Occurrences

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

Parameters

Type Name Description
string $canonical_url The post's canonical URL.
WP_Post $post Post object.

PHP Doc

/**
	 * Filters the canonical URL for a post.
	 *
	 * @since 4.6.0
	 *
	 * @param string  $canonical_url The post's canonical URL.
	 * @param WP_Post $post          Post object.
	 */