Changeset 56876 for branches/5.2/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 10/12/2023 03:04:07 PM (16 months ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
- Property svn:mergeinfo changed
/trunk merged: 56833-56836,56838
- Property svn:mergeinfo changed
-
branches/5.2/src/wp-admin/includes/ajax-actions.php
r55789 r56876 3511 3511 $shortcode = wp_unslash( $_POST['shortcode'] ); 3512 3512 3513 // Only process previews for media related shortcodes: 3514 $found_shortcodes = get_shortcode_tags_in_content( $shortcode ); 3515 $media_shortcodes = array( 3516 'audio', 3517 'embed', 3518 'playlist', 3519 'video', 3520 'gallery', 3521 ); 3522 3523 $other_shortcodes = array_diff( $found_shortcodes, $media_shortcodes ); 3524 3525 if ( ! empty( $other_shortcodes ) ) { 3526 wp_send_json_error(); 3527 } 3528 3513 3529 if ( ! empty( $_POST['post_ID'] ) ) { 3514 3530 $post = get_post( (int) $_POST['post_ID'] ); … … 3517 3533 // the embed shortcode requires a post 3518 3534 if ( ! $post || ! current_user_can( 'edit_post', $post->ID ) ) { 3519 if ( 'embed' === $shortcode) {3535 if ( in_array( 'embed', $found_shortcodes, true ) ) { 3520 3536 wp_send_json_error(); 3521 3537 }
Note: See TracChangeset
for help on using the changeset viewer.