Cleanup up the display, escaping, and handling of ID3 data for media. Rename wp_get_relevant_id3_keys() to wp_get_attachment_id3_keys().

Props nacin.
See #27574.



git-svn-id: https://develop.svn.wordpress.org/trunk@27869 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-03-31 05:15:39 +00:00
parent 882df9f94a
commit d8d26a4f79
4 changed files with 68 additions and 68 deletions

View File

@@ -1071,14 +1071,15 @@ function attachment_id3_data_meta_box( $post ) {
$meta = wp_get_attachment_metadata( $post->ID );
}
foreach ( wp_get_relevant_id3_keys( $post ) as $key => $label ): ?>
foreach ( wp_get_attachment_id3_keys( $post, 'edit' ) as $key => $label ) : ?>
<p>
<label for="title"><?php echo $label ?></label>
<input type="text" name="id3_<?php echo esc_attr( $key ) ?>" id="id3_<?php echo esc_attr( $key ) ?>" class="widefat" value="<?php
<label for="title"><?php echo $label ?></label><br />
<input type="text" name="id3_<?php echo esc_attr( $key ) ?>" id="id3_<?php echo esc_attr( $key ) ?>" class="large-text" value="<?php
if ( ! empty( $meta[ $key ] ) ) {
echo esc_attr( $meta[ $key ] );
}
?>" />
</p>
<?php endforeach;
}
<?php
endforeach;
}