the_guid хук-фильтрWP 4.2.0

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

Использование

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

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

	// filter...
	return $post_guid;
}
$post_guid(строка)
Escaped Global Unique Identifier (guid) of the post.
$post_id(int)
The post ID.

Список изменений

С версии 4.2.0 Введена.

Где вызывается хук

the_guid()
the_guid
wp-includes/post-template.php 206
echo apply_filters( 'the_guid', $post_guid, $post_id );

Где используется хук в WordPress

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