Changeset 56886 for branches/5.7/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 10/12/2023 03:15:04 PM (16 months ago)
- Location:
- branches/5.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.7
- Property svn:mergeinfo changed
/trunk merged: 56833-56838
- Property svn:mergeinfo changed
-
branches/5.7/src/wp-admin/includes/ajax-actions.php
r55778 r56886 3766 3766 $shortcode = wp_unslash( $_POST['shortcode'] ); 3767 3767 3768 // Only process previews for media related shortcodes: 3769 $found_shortcodes = get_shortcode_tags_in_content( $shortcode ); 3770 $media_shortcodes = array( 3771 'audio', 3772 'embed', 3773 'playlist', 3774 'video', 3775 'gallery', 3776 ); 3777 3778 $other_shortcodes = array_diff( $found_shortcodes, $media_shortcodes ); 3779 3780 if ( ! empty( $other_shortcodes ) ) { 3781 wp_send_json_error(); 3782 } 3783 3768 3784 if ( ! empty( $_POST['post_ID'] ) ) { 3769 3785 $post = get_post( (int) $_POST['post_ID'] ); … … 3772 3788 // The embed shortcode requires a post. 3773 3789 if ( ! $post || ! current_user_can( 'edit_post', $post->ID ) ) { 3774 if ( 'embed' === $shortcode) {3790 if ( in_array( 'embed', $found_shortcodes, true ) ) { 3775 3791 wp_send_json_error(); 3776 3792 }
Note: See TracChangeset
for help on using the changeset viewer.