-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gatsby-source-wordpress] Refactored featured_media map for deep nodes #2648
Conversation
* Featured medias coul be nested at any level * The most certain way to have photos works with this version on the plugin is to either name the fiel featured_media or include the image as Post Object. * Fixed bug where in some case the old featured_media field was not deleted.
Deploy preview ready! Built with commit e286a25 |
Funny enough pieh has been working on something similar with this PR #2646 I believe my PR is more generic as it allows for featured_medias to be placed anywhere in the JSON tree, let's say for example, in a linked Post Object. |
haha, brilliant minds… I'll let you make the call on which one to merge. |
It's nobrainer that You should take Your code, as most likely You will maintain it ;) Just check my comment #2646 (comment) and I think You can close my PR and focus on this one. |
* Most of the credits goes to @pieh for a better solution that solved the same problems and widely improved code simplicity. #2646 * Made the Media lookup begin at JSON tree root instead of keeping this for ACF Field only. Changed constants names accordingly. * Making thise more generic allorws Custom Post Types to benefit from this improvements and yet unseen objects shapes. * Incorporated fix on bug mentionned here #2646 (comment) * May solve this #2587, this #2492, this #2328
|
Tested with using-wordpress OK.