Skip to content
Open
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion includes/amp-helper-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@
if ( ! amp_is_dev_mode() || ! is_admin_bar_showing() ) {
return;
}

ob_start();
?>
<script data-ampdevmode>
<script>
( () => {
if ( 'amp-wizard-completion-preview' !== window.name ) {
return;
Expand All @@ -226,6 +228,8 @@
} )();
</script>
<?php
$script = str_replace( array( '<script>', '</script>' ), '', ob_get_clean() );

Check failure on line 231 in includes/amp-helper-functions.php

View workflow job for this annotation

GitHub Actions / Lint: PHP

Short array syntax must be used to define arrays
wp_print_inline_script_tag( $script, array( 'data-ampdevmode' => true ) );

Check failure on line 232 in includes/amp-helper-functions.php

View workflow job for this annotation

GitHub Actions / Lint: PHP

Short array syntax must be used to define arrays
}

/**
Expand Down
Loading