get_enclosed хук-фильтрWP 2.0.0

Filters the list of enclosures already enclosed for the given post.

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

add_filter( 'get_enclosed', 'wp_kama_get_enclosed_filter', 10, 2 );

/**
 * Function for `get_enclosed` filter-hook.
 * 
 * @param string[] $pung    Array of enclosures for the given post.
 * @param int      $post_id Post ID.
 *
 * @return string[]
 */
function wp_kama_get_enclosed_filter( $pung, $post_id ){

	// filter...
	return $pung;
}
$pung(string[])
Array of enclosures for the given post.
$post_id(int)
Post ID.

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

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

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

get_enclosed()
get_enclosed
wp-includes/post.php 5635
return apply_filters( 'get_enclosed', $pung, $post_id );

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

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