Skip to content

Instantly share code, notes, and snippets.

@trueqap
Last active March 20, 2018 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trueqap/101b0440d0e03a55642a8ad412c10468 to your computer and use it in GitHub Desktop.
Save trueqap/101b0440d0e03a55642a8ad412c10468 to your computer and use it in GitHub Desktop.
/wp-content/mu-plugins/swift-performance-loader.php
<?php
/**
* Plugin Name: Swift Performance early loader
*/
class Swift_Performance_Loader {
public static function load(){
wp_cookie_constants();
$plugins = get_option('active_plugins');
if (in_array('swift-performance/performance.php', $plugins)){
include_once trailingslashit(str_replace('mu-plugins', 'plugins', __DIR__)) . 'swift-performance/performance.php';
}
}
}
Swift_Performance_Loader::load();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment