|
@@ 116-123 (lines=8) @@
|
| 113 |
|
return ! in_array( $post->post_type, Jetpack_Sync_Settings::get_setting( 'post_types_blacklist' ) ); |
| 114 |
|
} |
| 115 |
|
|
| 116 |
|
function remove_embed() { |
| 117 |
|
global $wp_embed; |
| 118 |
|
remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); |
| 119 |
|
// remove the embed shortcode since we would do the part later. |
| 120 |
|
remove_shortcode( 'embed' ); |
| 121 |
|
// Attempts to embed all URLs in a post |
| 122 |
|
remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
| 123 |
|
} |
| 124 |
|
|
| 125 |
|
function add_embed() { |
| 126 |
|
global $wp_embed; |
|
@@ 125-132 (lines=8) @@
|
| 122 |
|
remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
| 123 |
|
} |
| 124 |
|
|
| 125 |
|
function add_embed() { |
| 126 |
|
global $wp_embed; |
| 127 |
|
add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); |
| 128 |
|
// Shortcode placeholder for strip_shortcodes() |
| 129 |
|
add_shortcode( 'embed', '__return_false' ); |
| 130 |
|
// Attempts to embed all URLs in a post |
| 131 |
|
add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
| 132 |
|
} |
| 133 |
|
|
| 134 |
|
// Expands wp_insert_post to include filtered content |
| 135 |
|
function filter_post_content_and_add_links( $post_object ) { |