A WordPress-centric search engine for devs and theme authors



attachment_url_to_postid ›

Since4.2.0
Deprecatedn/a
apply_filters( 'attachment_url_to_postid', $post_id, $url )
Parameters: (2)
  • (int|null) $post_id The post_id (if any) found by the function.
    Required: Yes
  • (string) $url The URL being looked up.
    Required: Yes
Defined at:
Codex:

Filters an attachment id found by URL.





Source

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