Changeset 56877 for branches/5.3/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 10/12/2023 03:05:46 PM (13 months ago)
- Location:
- branches/5.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.3
- Property svn:mergeinfo changed
/trunk merged: 56833-56836,56838
- Property svn:mergeinfo changed
-
branches/5.3/src/wp-admin/includes/ajax-actions.php
r55788 r56877 3736 3736 $shortcode = wp_unslash( $_POST['shortcode'] ); 3737 3737 3738 // Only process previews for media related shortcodes: 3739 $found_shortcodes = get_shortcode_tags_in_content( $shortcode ); 3740 $media_shortcodes = array( 3741 'audio', 3742 'embed', 3743 'playlist', 3744 'video', 3745 'gallery', 3746 ); 3747 3748 $other_shortcodes = array_diff( $found_shortcodes, $media_shortcodes ); 3749 3750 if ( ! empty( $other_shortcodes ) ) { 3751 wp_send_json_error(); 3752 } 3753 3738 3754 if ( ! empty( $_POST['post_ID'] ) ) { 3739 3755 $post = get_post( (int) $_POST['post_ID'] ); … … 3742 3758 // the embed shortcode requires a post 3743 3759 if ( ! $post || ! current_user_can( 'edit_post', $post->ID ) ) { 3744 if ( 'embed' === $shortcode) {3760 if ( in_array( 'embed', $found_shortcodes, true ) ) { 3745 3761 wp_send_json_error(); 3746 3762 }
Note: See TracChangeset
for help on using the changeset viewer.