wp_get_attachment_url filter-hook . WP 2.1.0
Filters the attachment URL.
Usage
add_filter( 'wp_get_attachment_url', 'filter_function_name_4022', 10, 2 ); function filter_function_name_4022( $url, $attachment_id ){ // filter... return $url; }
- $url(string)
- URL for the given attachment.
- $attachment_id(int)
- Attachment post ID.
Changelog
Since 2.1.0 | Introduced. |
Where the hook is called
wp_get_attachment_url
wp-includes/post.php 6221
$url = apply_filters( 'wp_get_attachment_url', $url, $post->ID );