idea for improving – pass an optional string parameter to the get_the_image func
1st of all thanks for a great plugin.
Scenario: I’m using the get_the_image function to customize the post-search.php template. Let’s say I have a post with two pictures sunset.jpg an sunrise.jpg, sunset.jpg being the 1st one in the post. If a user is searching for sunrise the post will appear in search result but the display thumbnail will be sunset.jpg (being the 1st image in the post). It will be useful to optionally pass the search string to the get_the_image function and the function should try to match the search string using regular expressions to some image properties (title, alt, filename).
Another scenario, a post contains some pictures of people, I’m searching for some one, in the search result I will get the 1st picture that might be of somebody else.
- The topic ‘idea for improving – pass an optional string parameter to the get_the_image func’ is closed to new replies.