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