Created
January 27, 2017 00:22
-
-
Save remyperona/1ff1d024f615a14d05f0336f9e508d94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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’ 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