Skip to content

Commit c4a3966

Browse files
authored
Merge pull request #4135 from ampproject/add/enqueued-dependency-sourcing
Add source information for script/style dependencies and inline scripts/styles
2 parents 506847f + 94b99bd commit c4a3966

14 files changed

+1090
-212
lines changed

.travis.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,13 @@ jobs:
118118
php: "7.1"
119119
env: WP_VERSION=latest DEV_LIB_ONLY=phpunit,phpsyntax INSTALL_PWA_PLUGIN=1
120120

121-
- name: PHP unit tests (7.0, WordPress latest)
121+
- name: PHP unit tests (7.0, WordPress 5.1)
122122
php: "7.0"
123-
env: WP_VERSION=latest DEV_LIB_ONLY=phpunit,phpsyntax INSTALL_PWA_PLUGIN=1
123+
env: WP_VERSION=5.1 DEV_LIB_ONLY=phpunit,phpsyntax INSTALL_PWA_PLUGIN=1
124124

125-
- name: PHP unit tests (5.6, WordPress latest)
125+
- name: PHP unit tests (5.6, WordPress 5.0)
126126
php: "5.6"
127-
env: WP_VERSION=latest DEV_LIB_ONLY=phpunit,phpsyntax INSTALL_PWA_PLUGIN=1
128-
129-
- name: PHP unit tests (5.4, WordPress 5.1)
130-
php: "5.4"
131-
env: WP_VERSION=5.1 DEV_LIB_ONLY=phpunit
132-
133-
- name: PHP unit tests (5.5, WordPress 5.0)
134-
php: "5.5"
135-
env: WP_VERSION=5.0 DEV_LIB_ONLY=phpunit,phpsyntax
127+
env: WP_VERSION=5.0 DEV_LIB_ONLY=phpunit,phpsyntax INSTALL_PWA_PLUGIN=1
136128

137129
- name: PHP unit tests w/ external-http (5.6, WordPress 4.9)
138130
php: "5.6"

amp.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
$_amp_load_errors = new WP_Error();
3030

31-
if ( version_compare( phpversion(), '5.4', '<' ) ) {
31+
if ( version_compare( phpversion(), '5.6', '<' ) ) {
3232
$_amp_load_errors->add(
3333
'insufficient_php_version',
3434
sprintf(
@@ -307,6 +307,9 @@ function amp_deactivate() {
307307
flush_rewrite_rules( false );
308308
}
309309

310+
// The plugins_loaded action is the earliest we can run this since that is when pluggable.php has been required and wp_hash() is available.
311+
add_action( 'plugins_loaded', [ 'AMP_Validation_Manager', 'init_validate_request' ], ~PHP_INT_MAX );
312+
310313
/*
311314
* Register AMP scripts regardless of whether AMP is enabled or it is the AMP endpoint
312315
* for the sake of being able to use AMP components on non-AMP documents ("dirty AMP").

assets/css/src/amp-validation-error-taxonomy.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ body.taxonomy-amp_validation_error .wp-list-table .new th.check-column input {
445445
#amp_stylesheets .column-minified,
446446
#amp_stylesheets .column-final_size,
447447
#amp_stylesheets .column-percentage {
448-
width: 10%;
448+
width: 8%;
449449
text-align: right;
450450
}
451451

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "https://github.com/ampproject/amp-wp",
66
"license": "GPL-2.0-or-later",
77
"require": {
8-
"php": "^5.4 || ^7.0",
8+
"php": "^5.6 || ^7.0",
99
"ext-curl": "*",
1010
"ext-date": "*",
1111
"ext-dom": "*",
@@ -34,7 +34,7 @@
3434
},
3535
"config": {
3636
"platform": {
37-
"php": "5.4"
37+
"php": "5.6"
3838
},
3939
"sort-packages": true
4040
},

composer.lock

Lines changed: 66 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)