Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?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