Created
August 5, 2020 05:43
-
-
Save westonruter/8a7d83bf33d38cc39b0832361c06c91f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Try Node No Longer Exists | |
* Description: To test, ensure that all templates as served as AMP and then access what would be an AMP page with "?try_node_no_longer_exists_warning=1". | |
*/ | |
add_action( 'template_redirect', function () { | |
if ( ! isset( $_GET['try_node_no_longer_exists_warning'] ) ) { | |
return; | |
} | |
?> | |
<html amp="" lang="en"> | |
<head> | |
<meta charSet="utf-8"> | |
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> | |
<style amp-custom=""> | |
amp-story-grid-layer { | |
overflow: visible; | |
} | |
</style> | |
<title>Story of Bison</title> | |
<?php wp_head(); ?> | |
</head> | |
<body> | |
<amp-story publisher="WordPress Develop2wwss" publisher-logo-src="https://wordpressdev.lndo.site/content/plugins/web-stories/assets/images/fallback-wordpress-publisher-logo.png" title="Story of Bison" poster-portrait-src="https://wordpressdev.lndo.site/content/uploads/2020/07/American_bison_k5680-1-300x196.jpg"> | |
<amp-story-page id="a4ddcc59-91f2-4da2-8251-bdd86dc99523"> | |
<amp-story-grid-layer template="vertical" aspect-ratio="412:618"> | |
<div class="page-fullbleed-area" style="background-color:#fff"></div> | |
</amp-story-grid-layer> | |
</amp-story-page> | |
</amp-story> | |
<?php wp_footer(); ?> | |
</body> | |
</html> | |
<?php | |
exit; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment