@@ 127-134 (lines=8) @@ | ||
124 | return ! in_array( $post->post_type, Jetpack_Sync_Settings::get_setting( 'post_types_blacklist' ) ); |
|
125 | } |
|
126 | ||
127 | function remove_embed() { |
|
128 | global $wp_embed; |
|
129 | remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); |
|
130 | // remove the embed shortcode since we would do the part later. |
|
131 | remove_shortcode( 'embed' ); |
|
132 | // Attempts to embed all URLs in a post |
|
133 | remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
|
134 | } |
|
135 | ||
136 | function add_embed() { |
|
137 | global $wp_embed; |
|
@@ 136-143 (lines=8) @@ | ||
133 | remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
|
134 | } |
|
135 | ||
136 | function add_embed() { |
|
137 | global $wp_embed; |
|
138 | add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); |
|
139 | // Shortcode placeholder for strip_shortcodes() |
|
140 | add_shortcode( 'embed', '__return_false' ); |
|
141 | // Attempts to embed all URLs in a post |
|
142 | add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
|
143 | } |
|
144 | ||
145 | // Expands wp_insert_post to include filtered content |
|
146 | function filter_post_content_and_add_links( $post_object ) { |