Skip to content
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

REST API: Add the missing 'site_icon_url' to the index #3157

Closed

Conversation

Mamaduka
Copy link
Member

Backports changes from WordPress/gutenberg#42957.

The site_icon_url index was supposed to ship with WP 5.6 but was never backported into the core - WordPress/gutenberg#22952.

I also created an alternative PR to use the existing site_icon index, but later @TimothyBJacobs pointed out that site_icon_url is preferable since it can be filtered - WordPress/gutenberg#43514 (comment).

Gutenberg tracking issue: WordPress/gutenberg#43440
Trac ticket: https://core.trac.wordpress.org/ticket/56467


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@ockham
Copy link
Contributor

ockham commented Aug 31, 2022

Thank you very much, @Mamaduka! 🙌

Some unit tests are failing; apparently, tests/qunit/fixtures/wp-api-generated.js needs updating:

image

Furthermore, I've glanced over WordPress/gutenberg#42957 and WordPress/gutenberg#43514. I'm not entirely sure about the conclusion -- it seems like we won't need site_icon_url once we merge WordPress/gutenberg#43514; but we still need to backport it for backwards compatibility. Is that correct? 😊

@Mamaduka
Copy link
Member Author

I am running a PHP test suite to regenerate fixtures, and I will push the fix shortly.

Furthermore, I've glanced over WordPress/gutenberg#42957 and WordPress/gutenberg#43514. I'm not entirely sure about the conclusion -- it seems like we won't need site_icon_url once we merge WordPress/gutenberg#43514; but we still need to backport it for backwards compatibility. Is that correct? 😊

We decided to use site_icon_url index, so that it can be filtered via get_site_icon_url. I'll close #43514 after this is backported.

Copy link
Contributor

@ockham ockham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @Mamaduka 🚀

@TimothyBJacobs
Copy link
Member

May make sense to move this logic into add_site_icon_to_index.

@Mamaduka
Copy link
Member Author

Mamaduka commented Sep 2, 2022

Thanks for the suggestion, @TimothyBJacobs. I've updated the PR.

Copy link
Contributor

@ockham ockham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Re-approving the updated PR.)

@SergeyBiryukov
Copy link
Member

Thanks for the PR! Merged in r54083.

@Mamaduka Mamaduka deleted the backport/site-icon-url-rest-index branch May 9, 2023 09:19
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.

4 participants