the_guid filter-hookWP 4.2.0

Filters the escaped Global Unique Identifier (guid) of the post.

Usage

add_filter( 'the_guid', 'wp_kama_the_guid_filter', 10, 2 );

/**
 * Function for `the_guid` filter-hook.
 * 
 * @param string $guid Escaped Global Unique Identifier (guid) of the post.
 * @param int    $id   The post ID.
 *
 * @return string
 */
function wp_kama_the_guid_filter( $guid, $id ){

	// filter...
	return $guid;
}
$guid(string)
Escaped Global Unique Identifier (guid) of the post.
$id(int)
The post ID.

Changelog

Since 4.2.0 Introduced.

Where the hook is called

the_guid()
the_guid
wp-includes/post-template.php 203
echo apply_filters( 'the_guid', $guid, $id );

Where the hook is used in WordPress

wp-includes/default-filters.php 252
add_filter( 'the_guid', 'esc_url' );