Changeset 56895 for branches/6.2/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 10/12/2023 04:07:43 PM (16 months ago)
- Location:
- branches/6.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.2
- Property svn:mergeinfo changed
/trunk merged: 56833-56838
- Property svn:mergeinfo changed
-
branches/6.2/src/wp-admin/includes/ajax-actions.php
r55769 r56895 3856 3856 $shortcode = wp_unslash( $_POST['shortcode'] ); 3857 3857 3858 // Only process previews for media related shortcodes: 3859 $found_shortcodes = get_shortcode_tags_in_content( $shortcode ); 3860 $media_shortcodes = array( 3861 'audio', 3862 'embed', 3863 'playlist', 3864 'video', 3865 'gallery', 3866 ); 3867 3868 $other_shortcodes = array_diff( $found_shortcodes, $media_shortcodes ); 3869 3870 if ( ! empty( $other_shortcodes ) ) { 3871 wp_send_json_error(); 3872 } 3873 3858 3874 if ( ! empty( $_POST['post_ID'] ) ) { 3859 3875 $post = get_post( (int) $_POST['post_ID'] ); … … 3862 3878 // The embed shortcode requires a post. 3863 3879 if ( ! $post || ! current_user_can( 'edit_post', $post->ID ) ) { 3864 if ( 'embed' === $shortcode) {3880 if ( in_array( 'embed', $found_shortcodes, true ) ) { 3865 3881 wp_send_json_error(); 3866 3882 }
Note: See TracChangeset
for help on using the changeset viewer.