@@ 204-211 (lines=8) @@ | ||
201 | return ! in_array( $post->post_type, Jetpack_Sync_Settings::get_setting( 'post_types_blacklist' ) ); |
|
202 | } |
|
203 | ||
204 | function remove_embed() { |
|
205 | global $wp_embed; |
|
206 | remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); |
|
207 | // remove the embed shortcode since we would do the part later. |
|
208 | remove_shortcode( 'embed' ); |
|
209 | // Attempts to embed all URLs in a post |
|
210 | remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
|
211 | } |
|
212 | ||
213 | function add_embed() { |
|
214 | global $wp_embed; |
|
@@ 213-220 (lines=8) @@ | ||
210 | remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
|
211 | } |
|
212 | ||
213 | function add_embed() { |
|
214 | global $wp_embed; |
|
215 | add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); |
|
216 | // Shortcode placeholder for strip_shortcodes() |
|
217 | add_shortcode( 'embed', '__return_false' ); |
|
218 | // Attempts to embed all URLs in a post |
|
219 | add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
|
220 | } |
|
221 | ||
222 | // Expands wp_insert_post to include filtered content |
|
223 | function filter_post_content_and_add_links( $post_object ) { |