Skip to content

Instantly share code, notes, and snippets.

@westonruter
westonruter / amp-mobile-redirection.php
Last active September 4, 2020 15:51
[OBSOLETE] Proof of concept extension to the official AMP plugin for redirecting mobile visitors to the AMP version when it is available. Consider using with AMP-to-AMP Linking: https://gist.github.com/westonruter/f9ee9ea717d52471bae092879e3d52b0
<?php
/**
* AMP Mobile Redirection plugin file.
*
* @package AMP_Mobile_Redirection
* @author Weston Ruter, Google
* @link https://gist.github.com/westonruter/787c875e5ab724808c26014153e46ec6
* @license GPL-2.0-or-later
* @copyright 2019 Google Inc.
*
<?php
/**
* AMP-To-AMP plugin initialization file.
*
* @package AMP_To_AMP
* @author Weston Ruter, Google
* @link https://gist.github.com/westonruter/f9ee9ea717d52471bae092879e3d52b0
* @license GPL-2.0-or-later
* @copyright 2019 Google Inc.
*