#54358 closed task (blessed) (fixed)
Add URL Details endpoint from Gutenberg plugin into Core
Reported by: | hellofromTonya | Owned by: | hellofromTonya |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch has-unit-tests |
Focuses: | rest-api | Cc: |
Description
Adds the new URL Details endpoint to the REST API to allow retrieval of information about a remote URL.
WP_REST_URL_Details_Controller
https://github.com/WordPress/gutenberg/blob/trunk/lib/class-wp-rest-url-details-controller.phpWP_REST_URL_Details_Controller_Test
https://github.com/WordPress/gutenberg/blob/trunk/phpunit/class-wp-rest-url-details-controller-test.php
Tests and code will need adjustment for newer changes in 5.9 including tests and PHP 8.1.
Change History (17)
This ticket was mentioned in PR #1794 on WordPress/wordpress-develop by hellofromtonya.
3 years ago
#1
- Keywords has-patch has-unit-tests added
hellofromtonya commented on PR #1794:
3 years ago
#2
Hey @TimothyBJacobs, If you get time, could you please do a confidence check review as @getdave is on holiday?
TimothyBJacobs commented on PR #1794:
3 years ago
#3
This looks great to me!
#7
@
3 years ago
The translatable strings added in [51973] should use sprintf with placeholders instead of containg HTML tags correctly.
e.g. The OG image link of the <meta property="og:image"> or <meta property="og:image:url"> element from the URL.
should really be The OG image link of the %1$s or %2$s element from the URL.
. The placeholders can be explained in a translators comment.
Also, translators don't necessarily know what "OG" is. Maybe use "Open Graph image link" instead of "OG image link", or just "image link"?
hellofromtonya commented on PR #1794:
3 years ago
#8
Committed via changeset https://core.trac.wordpress.org/changeset/51973.
#9
@
3 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Also, filters like rest_prepare_url_details
need @since
annotations.
#10
@
3 years ago
- Keywords commit removed
Thank you @swissspidy! I'll create a follow-up patch shortly with those changes.
#11
@
3 years ago
The $remote_url_response
of the rest_prepare_url_details
filter is described as an array, but is a string.
This ticket was mentioned in PR #1797 on WordPress/wordpress-develop by hellofromtonya.
3 years ago
#12
Follow-up to changeset https://core.trac.wordpress.org/changeset/51973 to improve:
- Translations by removing HTML tags and spelling out
OG
- Adding
@since
param to new filters - Improving comments for code standards and consistency
- Improving readability by making multiple args multiline
- Micro-optimizations to avoid unnecessary variable assignments
Trac ticket: https://core.trac.wordpress.org/ticket/54358
hellofromtonya commented on PR #1797:
3 years ago
#13
@swissspidy This PR addresses the code review improvements you mentioned in the ticket. Could you please review the PR? Thanks!
hellofromtonya commented on PR #1797:
3 years ago
#14
Thank you @swissspidy!
Hey @SergeyBiryukov, Could you please review the PR? Thanks!
hellofromtonya commented on PR #1797:
3 years ago
#16
Committed via changeset https://core.trac.wordpress.org/changeset/52008.
Ports the URL Details from the Gutenberg repo to Core.
Updates the code to the newest changes in Core including: tests, PHP 8.1, standards, etc.
Trac ticket: https://core.trac.wordpress.org/ticket/54358