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