Created
April 13, 2020 14:12
-
-
Save timersys/cf4b78d76dc7da8aab83679e4f251fb5 to your computer and use it in GitHub Desktop.
Tiny plugin to enable State cache to Wp Rocket + GeotargetingWP
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 + GeotargetingWP States | |
* Plugin URI: https://geotargetingwp.com | |
* Description: Enable states cache for WPRocket. | |
* Author: timersys | |
* Author URI: https://geotargetingwp.com | |
*/ | |
/** | |
* By default WpRocket plugin will create different cache pages at a country level | |
* To add more levels (states or cities) you need to add the following filter | |
*/ | |
add_filter('rocket_geotargetingwp_enabled_cookies', function($enable){ | |
$enable[] = 'state'; | |
//$enable[] = 'city'; | |
return $enable; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment