Skip to content

Instantly share code, notes, and snippets.

@octalmage
Created July 19, 2015 13:09
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 octalmage/3d418aefb610ea9e11d8 to your computer and use it in GitHub Desktop.
Save octalmage/3d418aefb610ea9e11d8 to your computer and use it in GitHub Desktop.
Cache Buddy Filters.
<?php
add_filter('cache_buddy_logged_in_frontend', 'cache_buddy_custom_users', 10, 2);
add_filter('cache_buddy_logged_in_paths', 'cache_buddy_custom_paths', 10, 1);
function cache_buddy_custom_users($cookie, $user)
{
//Return true if the user gets to be logged in on front end. This is only ran when the user logs in.
return false;
}
function cache_buddy_custom_paths($paths)
{
array_push($paths, trailingslashit( COOKIEPATH ) . 'about');
return $paths;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment