Skip to content

Instantly share code, notes, and snippets.

@nicholasm
nicholasm / disable-plugins-when-amp-page.php
Last active October 8, 2019 21:18 — forked from johnpbloch/disable-plugins-when-doing-local-dev.php
Disables specified WordPress plugins when doing local development
<?php
/*
Plugin Name: Disable plugins, network/multisite wide, when on an AMP page
Description: If the url final directory is /amp/, disables plugins that you specify
Version: 0.1.1
License: GPL version 2 or any later version
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/
@nicholasm
nicholasm / disable-plugin-on-amp.php
Last active October 7, 2019 23:31 — forked from damiencarbery/disable-cf7.php
Disable Contact Form 7 plugin except for certain pages.
<?php
/*
Plugin Name: Disable Plugin(s) on AMP page/post
Plugin URI: Original http://www.damiencarbery.com
Description: Disable plugin(s) on AMP pages (ex: https://site.com/post1/amp/).
Author: Original Damien Carbery, forked and edited by Nick Muller
Version: $Revision: $
$Id: $
*/