Make WordPress Core

Changeset 23985


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

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

props wonderboymusic. see #23961

Location:
trunk/wp-admin/includes
Files:
2 edited

Legend:

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

    r23940 r23985  
    7070                </div>
    7171                <?php endif; ?>
    72                 <label for="wp_format_video"><?php _e( 'Video embed code or URL' ); ?></label>
     72                <label for="wp_format_video"><?php
     73                        if ( current_user_can( 'unfiltered_html' ) )
     74                                _e( 'Video embed code or URL' );
     75                        else
     76                                _e( 'Video URL' );
     77                ?></label>
    7378                <textarea id="wp_format_video" type="text" name="_wp_format_video" class="widefat"><?php esc_html_e( $format_meta['video'] ); ?></textarea>
    7479                <div data-format="video" class="wp-format-media-holder hide-if-no-js<?php if ( ! $image ) echo ' empty'; ?>">
    … …  
    104109                </div>
    105110                <?php endif; ?>
    106                 <label for="wp_format_audio"><?php _e( 'Audio embed code or URL' ); ?></label>
     111                <label for="wp_format_audio"><?php
     112                        if ( current_user_can( 'unfiltered_html' ) )
     113                                _e( 'Audio embed code or URL' );
     114                        else
     115                                _e( 'Audio URL' );
     116                ?></label>
    107117                <textarea id="wp_format_audio" name="_wp_format_audio" class="widefat"><?php esc_html_e( $format_meta['audio'] );
    108118?></textarea>
  • 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.