Issue-1157: Root-Relative Image URLs Use Wrong Function for Base URL #1160
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request addresses an issue where root-relative image URLs were incorrectly processed due to the use of
site_url
instead ofhome_url
, particularly affecting setups using the Roots Bedrock WordPress boilerplate. This issue led to inline image blocks throwing errors when attempting to push articles to Apple News, as the images attempted to load from URLs prefixed incorrectly with "/wp". Fixes #1157.Implementation Details
home_url
instead ofsite_url
for generating full URLs from root-relative paths. This change ensures that the URLs for inline images in articles are correctly formed, avoiding the previously encountered errors.home
option field, ensuring compatibility and correctness across different WordPress configurations.Testing Steps
Acceptance Criteria