Skip to content

Use wp_get_attachment_image_src() to fix plugin-guidelines-issue#1128

Merged
mauteri merged 7 commits intoGatherPress:developfrom
carstingaxion:fix/1073
Jul 26, 2025
Merged

Use wp_get_attachment_image_src() to fix plugin-guidelines-issue#1128
mauteri merged 7 commits intoGatherPress:developfrom
carstingaxion:fix/1073

Conversation

@carstingaxion
Copy link
Copy Markdown
Collaborator

@carstingaxion carstingaxion commented Jul 25, 2025

Description of the Change

Closes #1073

How to test the Change

Changelog Entry

Fixed - Images should be added using wp_get_attachment_image() or similar functions

Credits

Props @carstingaxion

Checklist:

  • I agree to follow this project's Code of Conduct.
  • All new and existing tests pass.

@what-the-diff
Copy link
Copy Markdown

what-the-diff bot commented Jul 25, 2025

PR Summary

  • Update in Image Retrieval Method
    The way the system retrieves event images has been improved. Earlier it used a method named get_the_post_thumbnail_url for this task, but now it uses a more efficient one called get_the_post_thumbnail_id.

  • Modification of Image Display Rendering
    There's also a change in how the system displays these event images. The <img> HTML tag, which is responsible for image presentation, now uses wp_get_attachment_image_src to fetch the image source. This method better aligns with the new data structure and is expected to be more effective.

@carstingaxion carstingaxion changed the title Use wp_get_attachment_image_src() ti fix plugin-guidelines-issue Use wp_get_attachment_image_src() to fix plugin-guidelines-issue Jul 25, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Preview changes with Playground

You can preview the recent changes for PR#1128 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

@mauteri
Copy link
Copy Markdown
Contributor

mauteri commented Jul 26, 2025

Nice, this issue was annoying lol

@mauteri mauteri merged commit 23683bf into GatherPress:develop Jul 26, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Images should be added using wp_get_attachment_image() or similar functions

2 participants