diff --git src/wp-includes/class-wp-embed.php src/wp-includes/class-wp-embed.php
index 23a8289..c0c8879 100644
|
|
|
class WP_Embed { |
| 56 | 56 | |
| 57 | 57 | add_shortcode( 'embed', array( $this, 'shortcode' ) ); |
| 58 | 58 | |
| | 59 | add_filter( 'escaped_shortcode', array( $this, 'reescape' ) ); |
| | 60 | |
| 59 | 61 | // Do the shortcode (only the [embed] one is registered) |
| 60 | 62 | $content = do_shortcode( $content ); |
| 61 | 63 | |
| | 64 | remove_filter( 'escaped_shortcode', array( $this, 'reescape' ) ); |
| | 65 | |
| 62 | 66 | // Put the original shortcodes back |
| 63 | 67 | $shortcode_tags = $orig_shortcode_tags; |
| 64 | 68 | |
| … |
… |
class WP_Embed { |
| 66 | 70 | } |
| 67 | 71 | |
| 68 | 72 | /** |
| | 73 | * Processing the embed shortcode early causes escaped shortcodes to become |
| | 74 | * real shortcodes, so let's re-escape them |
| | 75 | */ |
| | 76 | public function reescape( $shortcode ) { |
| | 77 | return "[$shortcode]"; |
| | 78 | } |
| | 79 | |
| | 80 | /** |
| 69 | 81 | * If a post/page was saved, then output JavaScript to make |
| 70 | 82 | * an AJAX request that will call WP_Embed::cache_oembed(). |
| 71 | 83 | */ |
diff --git src/wp-includes/shortcodes.php src/wp-includes/shortcodes.php
index 9874785..e323871 100644
|
|
|
function do_shortcode_tag( $m ) { |
| 278 | 278 | |
| 279 | 279 | // allow [[foo]] syntax for escaping a tag |
| 280 | 280 | if ( $m[1] == '[' && $m[6] == ']' ) { |
| 281 | | return substr($m[0], 1, -1); |
| | 281 | /** |
| | 282 | * Filter an escaped shortcode |
| | 283 | * |
| | 284 | * @since 4.1.0 |
| | 285 | * |
| | 286 | * @param string $shortcode The now-unescaped shortode string |
| | 287 | */ |
| | 288 | return apply_filters( 'escaped_shortcode', substr($m[0], 1, -1) ); |
| 282 | 289 | } |
| 283 | 290 | |
| 284 | 291 | $tag = $m[2]; |