From db9057f308e8e0c6364709bdfdd133c178d4b391 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 27 May 2014 11:30:16 +0000 Subject: [PATCH] Remove redundant get_shortcode_regex() check. props kovshenin. see #28195. Built from https://develop.svn.wordpress.org/trunk@28587 git-svn-id: http://core.svn.wordpress.org/trunk@28412 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ajax-actions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index c848a17036..47061aa7dd 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -2537,8 +2537,7 @@ function wp_ajax_parse_embed() { setup_postdata( $post ); $parsed = $wp_embed->run_shortcode( $_POST['content'] ); - if ( preg_match( '/' . get_shortcode_regex() . '/s', $parsed ) ) { - $parsed = do_shortcode( $parsed ); - } + $parsed = do_shortcode( $parsed ); + wp_send_json_success( $parsed ); }