WordPress.org

Make WordPress Core

Ticket #22769: 22769.diff

File 22769.diff, 987 bytes (added by nacin, 17 months ago)
  • wp-admin/includes/media.php

     
    14131413        if ( $item ) 
    14141414                $item = '<table class="compat-attachment-fields">' . $item . '</table>'; 
    14151415 
     1416        foreach ( $hidden_fields as $hidden_field => $value ) { 
     1417                $item .= '<input type="hidden" name="' . esc_attr( $hidden_field ) . '" value="' . esc_attr( $value ) . '" />' . "\n"; 
     1418        } 
     1419 
    14161420        return array( 
    14171421                'item'   => $item, 
    1418                 'hidden' => $hidden_fields, 
    14191422                'meta'   => $media_meta, 
    14201423        ); 
    14211424} 
     
    23322335        <?php 
    23332336        $extras = get_compat_media_markup( $post->ID ); 
    23342337        echo $extras['item']; 
    2335         foreach ( $extras['hidden'] as $hidden_field => $value ) { 
    2336                 echo '<input type="hidden" name="' . esc_attr( $hidden_field ) . '" value="' . esc_attr( $value ) . '" />' . "\n"; 
    2337         } 
    23382338        echo '<input type="hidden" id="image-edit-context" value="edit-attachment" />' . "\n"; 
    23392339} 
    23402340