WordPress.org

Make WordPress Core

Changes between Version 3 and Version 4 of Ticket #41816, comment 7


Ignore:
Timestamp:
02/20/2019 10:12:23 PM (7 months ago)
Author:
leodandesign
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #41816, comment 7

    v3 v4  
    99It's not elegant, but effective. Couldn't this be dropped into attachment_url_to_postid() function to get the url using a simple pattern instead of making another database lookup.
    1010
    11 In the real world, I am using this to pull through a full size image for a Schema Json-LD object.
     11In the real world, I am using this to pull through a full size image url if the image is part of the $post->post_content for a Schema Json-LD object.
    1212
    1313I've also used it in the past as part of function to filter the img src to replace it with the smaller img of the same ratios, for a front end javascript function to dynamically calculate the correct srcset img to get based on image width on-screen.