[wp-trac] [WordPress Trac] #59769: Blocked preview of non built in media shortcodes
WordPress Trac
noreply at wordpress.org
Mon Oct 30 17:01:27 UTC 2023
#59769: Blocked preview of non built in media shortcodes
--------------------------+-----------------------------
Reporter: programmin | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.2.2
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
If I want to add my own display shortcode preview, this no longer works:
wp_ajax_parse_media_shortcode() now has:
{{{#!php
<?php
// Only process previews for media related shortcodes:
$found_shortcodes = get_shortcode_tags_in_content( $shortcode );
$media_shortcodes = array(
'audio',
'embed',
'playlist',
'video',
'gallery',
);
$other_shortcodes = array_diff( $found_shortcodes,
$media_shortcodes );
if ( ! empty( $other_shortcodes ) ) {
wp_send_json_error();
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59769>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list