Make WordPress Core


Ignore:
Timestamp:
04/14/2013 01:21:47 AM (12 years ago)
Author:
markjaquith
Message:

Only say we accept a raw video/audio embed code for unfiltered_html users.

props wonderboymusic. see #23961

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r23928 r23985  
    204204
    205205    foreach ( $format_keys as $key ) {
    206         if ( isset( $post_data[ '_wp_format_' . $key ] ) )
    207             update_post_meta( $post_ID, '_wp_format_' . $key, wp_filter_post_kses( $post_data[ '_wp_format_' . $key ] ) );
     206        if ( isset( $post_data[ '_wp_format_' . $key ] ) ) {
     207            if ( current_user_can( 'unfiltered_html' ) )
     208                update_post_meta( $post_ID, '_wp_format_' . $key, $post_data[ '_wp_format_' . $key ] );
     209            else
     210                update_post_meta( $post_ID, '_wp_format_' . $key, wp_filter_post_kses( $post_data[ '_wp_format_' . $key ] ) );
     211        }
    208212    }
    209213
Note: See TracChangeset for help on using the changeset viewer.