Changeset 56875 for branches/5.9/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 10/12/2023 03:03:26 PM (11 months ago)
- Location:
- branches/5.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.9
- Property svn:mergeinfo changed
/trunk merged: 56833-56838
- Property svn:mergeinfo changed
-
branches/5.9/src/wp-admin/includes/ajax-actions.php
r55774 r56875 3813 3813 $shortcode = wp_unslash( $_POST['shortcode'] ); 3814 3814 3815 // Only process previews for media related shortcodes: 3816 $found_shortcodes = get_shortcode_tags_in_content( $shortcode ); 3817 $media_shortcodes = array( 3818 'audio', 3819 'embed', 3820 'playlist', 3821 'video', 3822 'gallery', 3823 ); 3824 3825 $other_shortcodes = array_diff( $found_shortcodes, $media_shortcodes ); 3826 3827 if ( ! empty( $other_shortcodes ) ) { 3828 wp_send_json_error(); 3829 } 3830 3815 3831 if ( ! empty( $_POST['post_ID'] ) ) { 3816 3832 $post = get_post( (int) $_POST['post_ID'] ); … … 3819 3835 // The embed shortcode requires a post. 3820 3836 if ( ! $post || ! current_user_can( 'edit_post', $post->ID ) ) { 3821 if ( 'embed' === $shortcode) {3837 if ( in_array( 'embed', $found_shortcodes, true ) ) { 3822 3838 wp_send_json_error(); 3823 3839 }
Note: See TracChangeset
for help on using the changeset viewer.