Invalidate oEmbed caches on pre_post_update instead of save_post so existing metadata caches may be used. fixes #22190.

git-svn-id: https://develop.svn.wordpress.org/trunk@22369 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-11-05 16:47:04 +00:00
parent b1eccdd12d
commit 502908fa4c
1 changed files with 2 additions and 2 deletions

View File

@ -25,8 +25,8 @@ class WP_Embed {
// Attempts to embed all URLs in a post
add_filter( 'the_content', array( $this, 'autoembed' ), 8 );
// After a post is saved, invalidate the oEmbed cache
add_action( 'save_post', array( $this, 'delete_oembed_caches' ) );
// When a post is saved, invalidate the oEmbed cache
add_action( 'pre_post_update', array( $this, 'delete_oembed_caches' ) );
// After a post is saved, cache oEmbed items via AJAX
add_action( 'edit_form_advanced', array( $this, 'maybe_run_ajax_cache' ) );