get_attached_media хук-фильтр . WP 3.6.0
Filters the list of media attached to the given post.
Использование
add_filter( 'get_attached_media', 'filter_function_name_736', 10, 3 ); function filter_function_name_736( $children, $type, $post ){ // filter... return $children; }
- $children(WP_Post[])
- Array of media attached to the given post.
- $type(строка)
- Mime type of the media desired.
- $post(WP_Post)
- Post object.
Список изменений
С версии 3.6.0 | Введена. |
Где вызывается хук
get_attached_media
wp-includes/media.php 4495
return (array) apply_filters( 'get_attached_media', $children, $type, $post );