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

Font Library: addresses additional REST API feedback #58333

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

creativecoder
Copy link
Contributor

@creativecoder creativecoder commented Jan 26, 2024

What?

Addresses additional feedback from this review.

  • Removes WP_Query option to disable updating the meta cache (since we are using post meta in gutenberg_convert_legacy_font_family_format)
  • Enables meta_cap checks on wp_font_family and wp_font_face posts types
  • Implements id based permission checks for get_item_permissions_check on font family and font face controllers.

Testing Instructions

  • Ensure that only admins remain able to access font family and font face endpoints.

@creativecoder creativecoder added [Type] Task Issues or PRs that have been broken down into an individual action to take [Feature] Font Library labels Jan 26, 2024
@creativecoder creativecoder self-assigned this Jan 26, 2024
Copy link

github-actions bot commented Jan 26, 2024

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/experimental/fonts/font-library/class-wp-rest-font-faces-controller.php
❔ lib/experimental/fonts/font-library/class-wp-rest-font-families-controller.php
❔ lib/experimental/fonts/font-library/font-library.php

@creativecoder creativecoder added Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) [Status] In Progress Tracking issues with work in progress and removed Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Jan 26, 2024
@creativecoder creativecoder added the REST API Interaction Related to REST API label Jan 26, 2024
@creativecoder creativecoder changed the title Font family migration: use post meta cache in query Font Library: addresses additional REST API feedback Jan 26, 2024
@creativecoder creativecoder removed the [Status] In Progress Tracking issues with work in progress label Jan 29, 2024
Copy link
Member

@mikachan mikachan left a comment

Choose a reason for hiding this comment

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

I believe this addresses the feedback left in #57688 (review). I can also confirm that only an admin user can access the font family and font face endpoints.

@creativecoder creativecoder merged commit 8c2c093 into trunk Jan 29, 2024
57 checks passed
@creativecoder creativecoder deleted the fix/font-family-migration-query branch January 29, 2024 17:16
@github-actions github-actions bot added this to the Gutenberg 17.7 milestone Jan 29, 2024
@cbravobernal
Copy link
Contributor

I just cherry-picked this PR to the release/17.6 branch to get it included in the next release: 2f702c3

@cbravobernal cbravobernal removed the Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Font Library REST API Interaction Related to REST API [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants