WordPress at a glance
filter is not described

get_canonical_url filter-hook . WP 4.6.0

Filters the canonical URL for a post.

Usage

add_filter( 'get_canonical_url', 'filter_function_name_2344', 10, 2 );
function filter_function_name_2344( $canonical_url, $post ){
	// filter...

	return $canonical_url;
}
$canonical_url(string)
The post's canonical URL.
$post(WP_Post)
Post object.

Where the hook is called

wp_get_canonical_url()
wp-includes/link-template.php 3549
return apply_filters( 'get_canonical_url', $canonical_url, $post );

Where the hook is used (in WP core)

Does not used.