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