Skip to content

Instantly share code, notes, and snippets.

@JulioPotier
Last active November 9, 2015 13:53
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 JulioPotier/96340d7753de1dbb1b38 to your computer and use it in GitHub Desktop.
Save JulioPotier/96340d7753de1dbb1b38 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: Disable Embeds Cache
* Description: Don't like the 1 day embed cache?
* Version: 1.0
* Author: Julio Potier
* Author URI: https://wp-rocket.me
* License: GPLv2+
*
*/
add_filter( 'oembed_ttl', 'one_hundred_years_embed_cache_ttl' );
function one_hundred_years_embed_cache_ttl() {
return 100 * YEAR_IN_SECONDS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment