get_enclosed
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
wp-includes/post.php 6003
return apply_filters( 'get_enclosed', $pung, $post_id );