Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* AMP Mobile Server-Side Redirection plugin bootstrap.
* @package Google\AMP_Mobile_Server_Side_Redirection
* @author Weston Ruter, Google
* @license GPL-2.0-or-later
* @copyright 2021 Google Inc.
* @wordpress-plugin
* Plugin Name: AMP Mobile Server-Side Redirection
* Plugin URI:
* Description: Disable the default client-side JS-based mobile redirection in lieu of opt-in in to server-side HTTP redirects. The AMP plugin does client-side redirection by default since it is most compatible across various caching plugins, but if possible you should use server-side redirection because it is always faster.
* Version: 0.1
* Author: Weston Ruter, Google
* Author URI:
* License: GNU General Public License v2 (or later)
* License URI:
* Gist Plugin URI:
add_filter( 'amp_mobile_client_side_redirection', '__return_false' );
Copy link

westonruter commented Jan 31, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment