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