@@ 88-95 (lines=8) @@ | ||
85 | return $args; |
|
86 | } |
|
87 | ||
88 | function remove_embed() { |
|
89 | global $wp_embed; |
|
90 | remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); |
|
91 | // remove the embed shortcode since we would do the part later. |
|
92 | remove_shortcode( 'embed' ); |
|
93 | // Attempts to embed all URLs in a post |
|
94 | remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
|
95 | } |
|
96 | ||
97 | function add_embed() { |
|
98 | global $wp_embed; |
|
@@ 97-104 (lines=8) @@ | ||
94 | remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
|
95 | } |
|
96 | ||
97 | function add_embed() { |
|
98 | global $wp_embed; |
|
99 | add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); |
|
100 | // Shortcode placeholder for strip_shortcodes() |
|
101 | add_shortcode( 'embed', '__return_false' ); |
|
102 | // Attempts to embed all URLs in a post |
|
103 | add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); |
|
104 | } |
|
105 | ||
106 | // Expands wp_insert_post to include filtered content |
|
107 | function filter_post_content_and_add_links( $post_object ) { |