Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
a2771c2
Add in support for `integrity` data for SRI.
georgestephanis Sep 4, 2018
7a529b5
esc_attr ftw
georgestephanis Sep 4, 2018
ca8e040
Add populating for integrity parameters based on .org api
georgestephanis Sep 5, 2018
88f4135
Correct the conditionals for the right error condition.
georgestephanis Sep 5, 2018
7447b3c
Only swap out Jetpack asset urls if it's not a development version.
georgestephanis Sep 5, 2018
7329c7b
Tidy up the actions that it runs on
georgestephanis Sep 5, 2018
c91ce2d
Abstract some stuff like versions out
georgestephanis Sep 5, 2018
0290526
Styles need love too
georgestephanis Sep 5, 2018
ea6a480
Skip for already done items
georgestephanis Sep 5, 2018
54fd3d2
Add ability to pass in plugin and versino for getting checksums
georgestephanis Sep 5, 2018
dcae6a2
Add ability to get known plugin versions.
georgestephanis Sep 5, 2018
555a3f8
Whitespace
georgestephanis Sep 5, 2018
917636a
Move line
georgestephanis Sep 5, 2018
e6b8405
Retool get core checksums to take args
georgestephanis Sep 5, 2018
22bf06e
First pass at swapping out core files
georgestephanis Sep 5, 2018
855bc52
Oops. Forgot to specify the proper item in the object.
georgestephanis Sep 5, 2018
5da8586
Add a better fallback and remove an instance that shouldn't happen.
georgestephanis Sep 5, 2018
551dd5d
Some additional docs and tidying.
georgestephanis Sep 5, 2018
f636a6d
Switch url pattern for cdn as per @bazza
georgestephanis Sep 5, 2018
42765e5
Ditch version numbers
georgestephanis Sep 6, 2018
7178070
Abstract out the plugin resource swapping.
georgestephanis Sep 6, 2018
13f9d85
Purge SRI validation for the moment.
georgestephanis Sep 11, 2018
5f1be15
Somewhat big overhaul.
georgestephanis Sep 11, 2018
48b0d79
Fixed a fatal and a warning.
zinigor Sep 11, 2018
d5abf69
Moved the CDN class to its own module to be able to turn it off and on.
zinigor Sep 11, 2018
c738f61
Simplify how we get the core checksums.
georgestephanis Sep 11, 2018
7a1aeb7
Extract out the cdn domain to a class constant.
georgestephanis Sep 11, 2018
5e4f23e
Short circuit fn if no data returned.
georgestephanis Sep 11, 2018
31e0d0e
Don't loop through core files if there isn't a cdn'd version.
georgestephanis Sep 11, 2018
53929b6
Undo whitespace tweaks for less churn
georgestephanis Sep 11, 2018
2c989ef
tabs > spaces
georgestephanis Sep 11, 2018
36c9f82
Revert whitespace change for cleaner pr
georgestephanis Sep 11, 2018
c0fc5e6
If querying for the current version of Jetpack, return the built mani…
georgestephanis Sep 12, 2018
28fcc4f
Added override filters for plugin and core version strings.
zinigor Sep 12, 2018
60c30eb
Added a line to generate the manifest as the latest stage before depl…
zinigor Sep 12, 2018
29ae66d
Add new method for testing if a version number is public and can be o…
georgestephanis Sep 13, 2018
eb25214
Deactivate requiring a connection for now.
georgestephanis Sep 13, 2018
562c45c
Merge branch 'feature/assets-cdn' of https://github.com/Automattic/je…
georgestephanis Sep 13, 2018
94ac78c
Fixed filter name, props @georgestephanis.
zinigor Sep 13, 2018
f154a70
Added the core asset version filter where it needed to be.
zinigor Sep 14, 2018
b436c6f
Removed an unneeded excludes definition and fixed whitespace.
zinigor Sep 14, 2018
723bc74
Whitespace, comments and lint pass.
zinigor Sep 17, 2018
1f6e7dc
Also swap to cdn versions on the admin side.
georgestephanis Sep 17, 2018
9bf212a
Only query the api if the version string looks like a public release.
georgestephanis Sep 17, 2018
4f639f3
Let other plugins return their assets via a filter,
georgestephanis Sep 17, 2018
39c9d86
Cache for up to 24h the lack of data about a specific plugin version.
georgestephanis Sep 17, 2018
7aef3f3
Add support for CDN'ing WooCommerce assets as well.
georgestephanis Sep 17, 2018
6cdf8d4
Make sure wp-admin isn't concatenating scripts.
georgestephanis Sep 18, 2018
80d81f3
Simplify the rewriting of Core assets.
georgestephanis Sep 18, 2018
ea0f49c
Make sure we're not rewriting odd stuff like using admin-ajax to serv…
georgestephanis Sep 18, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Oops. Forgot to specify the proper item in the object.
  • Loading branch information
georgestephanis committed Sep 5, 2018
commit 855bc52dc9ee5ec2e1344929562b16d1785c85fa
4 changes: 2 additions & 2 deletions modules/photon.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static function cdnize_assets() {

$known_core_files = self::get_core_checksums();
$site_url = trailingslashit( site_url() );
foreach ( $wp_scripts as $handle => $thing ) {
foreach ( $wp_scripts->registered as $handle => $thing ) {
if ( wp_startswith( $thing->src, 'https://c0.wp.com/' ) ) {
continue;
}
Expand All @@ -44,7 +44,7 @@ public static function cdnize_assets() {
wp_script_add_data( $handle, 'integrity', 'md5-' . base64_encode( $known_core_files[ $src ] ) );
}
}
foreach ( $wp_styles as $handle => $thing ) {
foreach ( $wp_styles->registered as $handle => $thing ) {
if ( wp_startswith( $thing->src, 'https://c0.wp.com/' ) ) {
continue;
}
Expand Down