Skip to content

Commit 851f183

Browse files
committed
Remove use of AS class constant which is syntax error in PHP<7
1 parent 4600464 commit 851f183

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

includes/class-amp-theme-support.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,7 +1739,7 @@ public static function ensure_required_markup( Document $dom, $script_handles =
17391739
Tag::LINK,
17401740
[
17411741
Attribute::REL => Attribute::REL_PRELOAD,
1742-
Attribute::AS => Tag::SCRIPT,
1742+
'as' => Tag::SCRIPT,
17431743
Attribute::HREF => $runtime_src,
17441744
Attribute::CROSSORIGIN => Attribute::CROSSORIGIN_ANONYMOUS,
17451745
]
@@ -1759,7 +1759,7 @@ public static function ensure_required_markup( Document $dom, $script_handles =
17591759
Tag::LINK,
17601760
[
17611761
Attribute::REL => Attribute::REL_PRELOAD,
1762-
Attribute::AS => Tag::SCRIPT,
1762+
'as' => Tag::SCRIPT,
17631763
Attribute::HREF => $amp_scripts[ $script_handle ]->getAttribute( Attribute::SRC ),
17641764
Attribute::CROSSORIGIN => Attribute::CROSSORIGIN_ANONYMOUS,
17651765
]

lib/common/src/Attribute.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ interface Attribute
2727
const AMP_RUNTIME = 'amp-runtime';
2828
const AMP_SCRIPT_SRC = 'amp-script-src';
2929
const ARIA_HIDDEN = 'aria-hidden';
30-
const AS = 'as';
3130
const ASYNC = 'async';
3231
const AUTOPLAY = 'autoplay';
3332
const CHARSET = 'charset';

0 commit comments

Comments
 (0)