apply_filters( ‘attachment_url_to_postid’, int|null $post_id, string $url )

In this article

Filters an attachment ID found by URL.

Parameters

$post_idint|null
The post_id (if any) found by the function.
$urlstring
The URL being looked up.

Source

return (int) apply_filters( 'attachment_url_to_postid', $post_id, $url );

Changelog

VersionDescription
4.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.