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

Use CDN for block directory assets #23499

Merged

Conversation

tellyworth
Copy link
Contributor

This changes the block directory REST API to use CDN urls for script and CSS assets. It also allows for absolute URLs when returned by the remote API.

How has this been tested?

Unit tests, including new additions to WP_REST_Block_Directory_Controller_Test::test_prepare_item().

Types of changes

This also supports fully qualified URLs in future, and incorporates some raw escaping.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

Copy link
Member

@dd32 dd32 left a comment

Choose a reason for hiding this comment

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

Based purely on a visual review, this is what I had in mind myself.

Note: There's two spaces before each PHP_URL_SCHEME which should be compressed.

tellyworth and others added 4 commits June 30, 2020 23:38
This also supports fully qualified URLs in future, and incorporates some raw escaping.
@TimothyBJacobs TimothyBJacobs force-pushed the fix/block-directory-asset-url branch from 5667db2 to 2f8737f Compare July 1, 2020 03:39
@TimothyBJacobs TimothyBJacobs merged commit 535b82c into WordPress:master Jul 1, 2020
@github-actions github-actions bot added this to the Gutenberg 8.5 milestone Jul 1, 2020
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.

3 participants