diff --git a/class-gistpress.php b/class-gistpress.php index 7a297cc..167e927 100644 --- a/class-gistpress.php +++ b/class-gistpress.php @@ -571,8 +571,8 @@ public function delete_gist_transients( $post_id, WP_Post $post_after, WP_Post $ $this->delete_shortcode_transients = true; // Run the shortcodes to clear associated transients. - do_shortcode( $post_after->post_content ); - do_shortcode( $post_before->post_content ); + do_shortcode( $GLOBALS['wp_embed']->autoembed( $post_after->post_content ) ); + do_shortcode( $GLOBALS['wp_embed']->autoembed( $post_before->post_content ) ); // Delete raw transients whose keys match a post meta fallback. $keys = get_post_custom_keys( $post_id ); @@ -602,7 +602,7 @@ protected function rebuild_shortcode( array $rawattr ) { $attrs[] = $key . '="' . $value . '"'; } } - return '[gist ' . implode( ' ', $rawattr ) . ']'; + return '[gist ' . implode( ' ', $attrs ) . ']'; } /**