Skip to content

Commit 535dddd

Browse files
committed
Remove use of AS class constant which is syntax error in PHP<7
1 parent e9b0460 commit 535dddd

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
@@ -1755,7 +1755,7 @@ public static function ensure_required_markup( Document $dom, $script_handles =
17551755
Tag::LINK,
17561756
[
17571757
Attribute::REL => Attribute::REL_PRELOAD,
1758-
Attribute::AS => Tag::SCRIPT,
1758+
'as' => Tag::SCRIPT,
17591759
Attribute::HREF => $runtime_src,
17601760
Attribute::CROSSORIGIN => Attribute::CROSSORIGIN_ANONYMOUS,
17611761
]
@@ -1775,7 +1775,7 @@ public static function ensure_required_markup( Document $dom, $script_handles =
17751775
Tag::LINK,
17761776
[
17771777
Attribute::REL => Attribute::REL_PRELOAD,
1778-
Attribute::AS => Tag::SCRIPT,
1778+
'as' => Tag::SCRIPT,
17791779
Attribute::HREF => $amp_scripts[ $script_handle ]->getAttribute( Attribute::SRC ),
17801780
Attribute::CROSSORIGIN => Attribute::CROSSORIGIN_ANONYMOUS,
17811781
]

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)