mirrored from git://develop.git.wordpress.org/
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 #5285
Closed
matiasbenedetto
wants to merge
111
commits into
WordPress:trunk
from
matiasbenedetto:port/font-library
Closed
Font Library #5285
Changes from 1 commit
Commits
Show all changes
111 commits
Select commit
Hold shift + click to select a range
9a00814
add main backend files
matiasbenedetto 6f9aefc
add comment about CDN link
matiasbenedetto d78d99b
load main files
matiasbenedetto 1d74144
add routes from font library to routes test
matiasbenedetto 42eeb48
adding PHP unit tests for font library
matiasbenedetto 9e06a93
fix register post type for font family post type
matiasbenedetto b323b67
move the font library functions
matiasbenedetto 715eea9
avoid loading file deleted
matiasbenedetto e54426a
add wp_register_default_font_collection function
matiasbenedetto 1078767
load font-library functions file
matiasbenedetto 699f45b
register default font collection with init hook
matiasbenedetto a6dca33
fix rest-schema test
matiasbenedetto 9ba9187
Merge branch 'trunk' into port/font-library
matiasbenedetto 5084180
settings the right 'supports' values for wp_font_family post type
matiasbenedetto 46a1e9f
set hierarchical as false for wp_font_family post type
matiasbenedetto 7e666e6
fix url in test
matiasbenedetto e6cce43
fix set_upload_dir unit test
matiasbenedetto 673c042
fix unit test by using solvable host name
matiasbenedetto 72bbec5
avoid using gutenberg class, use core class instead
matiasbenedetto 1d8de84
add the font assets for the tests
matiasbenedetto d769cc5
Remove font files created after tests run
matiasbenedetto c4a31d2
removing unwanted echo line
matiasbenedetto 57f05a1
Merge branch 'trunk' into port/font-library
matiasbenedetto 8933cb8
add the custom post type routes to the routes test
matiasbenedetto 9aeb0ba
Removing class re-declaration check
matiasbenedetto 1725825
format php
matiasbenedetto d4bce59
updating wp-api-generated.js schema
matiasbenedetto 89e888f
Merge branch 'trunk' into port/font-library
matiasbenedetto ab70608
Revert "updating wp-api-generated.js schema"
matiasbenedetto 739edeb
moving font library rest controller to the endpoints folder
matiasbenedetto 534264e
Removing 'gutenberg' translation domain
matiasbenedetto c2d38d6
add comment about mime types logic
matiasbenedetto 2a715cd
using wordpress.org cdn to host google fonts collection data json file
matiasbenedetto 6bf7be3
updating wp-api-generated.js fixtures
matiasbenedetto bbb09e9
avoid deprecation error in test
matiasbenedetto 654dd1d
Moving default font collection registration to font.php file
matiasbenedetto 635d870
moving font library files to the main fonts folder
matiasbenedetto 8714206
remove path from deleted file
matiasbenedetto 2e08b53
Merge branch 'trunk' into port/font-library
matiasbenedetto 8c5ddec
replace strpos by str_contains
matiasbenedetto ae15e18
Merge branch 'trunk' into port/font-library
matiasbenedetto 04fe719
Testeable mime type conditionals
matiasbenedetto 839ff70
Change expected OTF files mime type
matiasbenedetto 5116443
standardize the output of install and uninstall endpoints
matiasbenedetto d89e201
update install and uninstall enpoints tests for the new standard outp…
matiasbenedetto e4b2a85
remove class_exist check coming from gutenberg
matiasbenedetto 8e3e711
remove unused line
matiasbenedetto 947e2cb
add trailing dot
matiasbenedetto 88ec9b7
se snake_case instead of camelCase on fontFamilies endpoint param
matiasbenedetto 3e63080
Merge branch 'trunk' into port/font-library
matiasbenedetto e218ec8
using DIR_TESTDATA for file assets paths
matiasbenedetto 02d6767
Remove extra new line
matiasbenedetto 641e9f3
emoving an unnecessary line break
matiasbenedetto 5178b1e
use self::factory() to insert post in test
matiasbenedetto 4612703
avoid adding variable name in return comment
matiasbenedetto f69e6e5
update return type of function
matiasbenedetto 17c9fd3
update comments
matiasbenedetto 3021090
move property definition on top of the class
matiasbenedetto db11c1f
replace EDITABLE by CREATABLE
matiasbenedetto 31af894
move uninstall endpoint schema
matiasbenedetto 21e3d33
updating wp-api-generated.js file
matiasbenedetto 9aa43bf
Rename function
matiasbenedetto f38bb59
make string translatable
matiasbenedetto b005321
Add id argument to the font collection.
anton-vlasenko 2b29de4
remove triling comma
matiasbenedetto aaf3741
change WP_REST_Response by rest_ensure_response
matiasbenedetto d6534cc
Remove path_join() for constant in tests
hellofromtonya 3b01b46
Change subpackage to Fonts
hellofromtonya f16ead0
Initialize properties to empty array
hellofromtonya 30369c6
Empty line before end of function return.
hellofromtonya e1f0b58
1. Implement schema.
anton-vlasenko aec6c93
Removes passing PHP version to WP_Font_Library::get_font_mime_types().
hellofromtonya b34fe52
Implement the schema for the font collections endpoint.
anton-vlasenko e948c1b
Multiline comments props costdev
hellofromtonya 0926426
Update wp-api-generated.js.
anton-vlasenko 11b26db
PHPCS: Remove extra empty line at end of file
hellofromtonya feb1199
Remove isset() where empty() is also used. Prop costdev
hellofromtonya a776cee
Use $request['id'] - props spacedmonkey
hellofromtonya 909da30
make install and uninstall endpoints singular.
matiasbenedetto fd706d1
rename font library enpoints and split font library controller in 2 d…
matiasbenedetto 7081941
remove unwanted enpoint from WP_REST_Font_Families_Controller class
matiasbenedetto b49da9a
dont show custom post type in rest endpoints
matiasbenedetto 2d369aa
use lowercase in error message
matiasbenedetto 86dab9e
update wording
matiasbenedetto b167d7f
Implementing get_item and get_items for /font-families/ endpoints
matiasbenedetto 1c23f09
Refactored font-family GET and DELETE api endpoints to use SLUG inste…
pbking 4f7fd91
Added or refactored tests for Font Family createItem, deleteItem, get…
pbking 14ca3bd
Refactored Font Family tests to use getPostBySlug
pbking 8d9f496
use snake_case schema in font collections endpoints
matiasbenedetto 1243b31
update api endpoint routes test and fixture
matiasbenedetto c5c6ec4
fix the font collections schema to accomodate arrays instead of a sin…
matiasbenedetto f398761
1. Remove the registerRoutes test.
anton-vlasenko d85e545
Fix CS.
anton-vlasenko 07d01ff
Fix CS.
anton-vlasenko ec52113
grouping font-families endpoints and add response schemas.
matiasbenedetto 3967726
add default order for font families
matiasbenedetto a19ac36
add since 6.4 comment
matiasbenedetto 05d3ff7
Remove extra new line
matiasbenedetto 963d226
remove extra spaces
matiasbenedetto e28134f
add missing 'since 6.4' comment
matiasbenedetto b2a96fc
Get rid of WP_REST_Font_Library_Controller_UnitTestCase.
anton-vlasenko 640159e
Fix parent class name.
anton-vlasenko d44da25
fix typo in comment
matiasbenedetto 603ee9e
Rename controller methods.
anton-vlasenko 7382406
Fix 404 errors.
anton-vlasenko d9ffea9
Move the tests to Tests_Fonts_WpRestFontCollectionsController.
anton-vlasenko 9edfb39
Fix the tests.
anton-vlasenko c4de43f
Improve PHPDOC blocks.
anton-vlasenko 9deeb4a
Fix @return type.
anton-vlasenko 6c9e856
Implement the test for Tests_Fonts_WpRestFontCollectionsController::t…
anton-vlasenko 89cd000
Fix the test.
anton-vlasenko 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
fix the font collections schema to accomodate arrays instead of a sin…
…gle object
- Loading branch information
commit c5c6ec47ffaf3af526fa1bf9d453033461606014
There are no files selected for viewing
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
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.
What about when you pass the ?_fields parameter ? You need code like this
wordpress-develop/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
Lines 1757 to 1764 in 23c811e
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.
This seems to be working out of the box. Is this the expected output?
2023-10-05.08-51-22.mp4
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.
@TimothyBJacobs Does it filter the filters by default?
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.
I see this is included at
https://github.com/WordPress/gutenberg/blob/066f8777b113ca8a71c79deb052d1deb23fe9860/lib/compat/wordpress-6.5/fonts/class-wp-rest-font-collections-controller.php#L166-L171