Changeset 56870 for branches/6.0/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 10/12/2023 02:59:09 PM (3 years ago)
- Location:
- branches/6.0
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-admin/includes/ajax-actions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.0
- Property svn:mergeinfo changed
/trunk merged: 56833-56838
- Property svn:mergeinfo changed
-
branches/6.0/src/wp-admin/includes/ajax-actions.php
r55773 r56870 3823 3823 $shortcode = wp_unslash( $_POST['shortcode'] ); 3824 3824 3825 // Only process previews for media related shortcodes: 3826 $found_shortcodes = get_shortcode_tags_in_content( $shortcode ); 3827 $media_shortcodes = array( 3828 'audio', 3829 'embed', 3830 'playlist', 3831 'video', 3832 'gallery', 3833 ); 3834 3835 $other_shortcodes = array_diff( $found_shortcodes, $media_shortcodes ); 3836 3837 if ( ! empty( $other_shortcodes ) ) { 3838 wp_send_json_error(); 3839 } 3840 3825 3841 if ( ! empty( $_POST['post_ID'] ) ) { 3826 3842 $post = get_post( (int) $_POST['post_ID'] ); … … 3829 3845 // The embed shortcode requires a post. 3830 3846 if ( ! $post || ! current_user_can( 'edit_post', $post->ID ) ) { 3831 if ( 'embed' === $shortcode) {3847 if ( in_array( 'embed', $found_shortcodes, true ) ) { 3832 3848 wp_send_json_error(); 3833 3849 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)