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

git-svn-id: http://core.svn.wordpress.org/trunk@22369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-11-05 16:47:04 +00:00
parent cf596d4979
commit 903714254c

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' ) );