WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/24/2014 06:03:58 PM (6 years ago)
Author:
helen
Message:

Set default values for attachment meta and ID3 data when preparing for JS to avoid errors in rendering templates. props ericmann for the initial patch. fixes #29013.

File:
1 edited

Legend:

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

    r29271 r29281  
    26292629        ),
    26302630        'editLink'   => false,
     2631        'meta'       => false,
    26312632    );
    26322633
     
    27262727        $response['meta'] = array();
    27272728        foreach ( wp_get_attachment_id3_keys( $attachment, 'js' ) as $key => $label ) {
     2729            $response['meta'][ $key ] = false;
     2730
    27282731            if ( ! empty( $meta[ $key ] ) ) {
    27292732                $response['meta'][ $key ] = $meta[ $key ];
Note: See TracChangeset for help on using the changeset viewer.