get_the_guid хук-фильтрWP 1.5.0

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

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

add_filter( 'get_the_guid', 'wp_kama_get_the_guid_filter', 10, 2 );

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

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

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

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

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

get_the_guid()
get_the_guid
WP_REST_Revisions_Controller::prepare_item_for_response()
get_the_guid
WP_REST_Posts_Controller::prepare_item_for_response()
get_the_guid
wp-includes/post-template.php 234
return apply_filters( 'get_the_guid', $post_guid, $post_id );
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php 594
'rendered' => apply_filters( 'get_the_guid', $post->guid, $post->ID ),
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 1785
'rendered' => apply_filters( 'get_the_guid', $post->guid, $post->ID ),

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

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