-
Notifications
You must be signed in to change notification settings - Fork 4.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
Font Library REST API endpoints: address initial feedback from feature branch #57946
Merged
creativecoder
merged 5 commits into
try/font-library-refactor
from
update/font-library-endpoints-initial-feedback
Jan 19, 2024
+446
−304
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
80331bf
Addresses initial feedback on font controllers
creativecoder 34560e3
Remove font face controller constructor and a few other tweaks
creativecoder 4dbfe43
Completes implementing context param so it works correctly with embed…
creativecoder d5743c9
Prevent creating or deleting font faces with invalid font families
creativecoder cc24936
Fix indenting and clarify comment
creativecoder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
25 changes: 0 additions & 25 deletions
25
lib/experimental/fonts/font-library/class-wp-rest-autosave-font-families-controller.php
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
lib/experimental/fonts/font-library/class-wp-rest-autosave-fonts-controller.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* WP_REST_Autosave_Fonts_Controller class. | ||
* | ||
* This file contains the class for the REST API Autosave Font Families and Font Faces Controller. | ||
* | ||
* @package WordPress | ||
* @subpackage REST_API | ||
* @since 6.5.0 | ||
*/ | ||
|
||
if ( class_exists( 'WP_REST_Autosave_Fonts_Controller' ) ) { | ||
return; | ||
} | ||
|
||
/** | ||
* Autosave Font Families Controller class. | ||
* | ||
* @since 6.5.0 | ||
*/ | ||
class WP_REST_Autosave_Fonts_Controller { | ||
public function register_routes() { | ||
// disable autosave endpoints for font families and faces. | ||
} | ||
} | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I'm making the empty autosave controller generic so we can use it for both
wp_font_family
andwp_font_face
post types.