Make WordPress Core


Ignore:
Timestamp:
12/06/2012 03:28:21 AM (14 years ago)
Author:
koopersmith
Message:

Add hidden fields via attachment_fields_to_edit to the existing compat output. props nacin. fixes #22769.

File:
1 edited

Legend:

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

    r23083 r23086  
    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        );
     
    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}
Note: See TracChangeset for help on using the changeset viewer.