attachment_url_to_postid
attachment_url_to_postid ( $url )
Parameters:- (string) url The URL to resolve.
Returns:- (int) The found post ID, or 0 on failure.
Defined at: - Introduced in WordPress: 4.0.0
- Deprecated in WordPress: —
Description
Tries to convert an attachment URL into a post ID.