wp_get_attachment_url хук-фильтр . WP 2.1.0
Filters the attachment URL.
Использование
add_filter( 'wp_get_attachment_url', 'filter_function_name_2685', 10, 2 ); function filter_function_name_2685( $url, $attachment_id ){ // filter... return $url; }
- $url(строка)
- URL for the given attachment.
- $attachment_id(число)
- Attachment post ID.
Список изменений
С версии 2.1.0 | Введена. |
Где вызывается хук
wp_get_attachment_url
wp-includes/post.php 6211
$url = apply_filters( 'wp_get_attachment_url', $url, $post->ID );