Skip to content

Instantly share code, notes, and snippets.

@Tabrisrp
Created January 27, 2017 00:22
Show Gist options
  • Save Tabrisrp/1ff1d024f615a14d05f0336f9e508d94 to your computer and use it in GitHub Desktop.
Save Tabrisrp/1ff1d024f615a14d05f0336f9e508d94 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: WP Rocket exclude dynamic CSS
* Description: Exclude dynamic CSS from static save
* Author: WP Rocket team
* License: GNU General Public License v3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
// Basic security, prevents file from being loaded directly.
defined( 'ABSPATH' ) or die( 'Cheatin&#8217; uh?' );
add_action( 'rocket_exclude_static_dynamic_resources', 'wprocket_exclude_dynamic_files' );
function wprocket_exclude_dynamic_files( $excluded_files ) {
// Make sure to edit the line below with the correct file path
$excluded_files[] = '/wp-content/plugins/s2member/s2member-o.php';
// Duplicate the above line as needed to exclude multiple files
return $excluded_files;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment