Punt media box

git-svn-id: http://svn.automattic.com/wordpress/trunk@9171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-10-14 17:29:38 +00:00
parent 70223289b5
commit 2b74b0ad04

View File

@ -210,50 +210,6 @@ function post_tags_meta_box($post) {
}
add_meta_box('tagsdiv', __('Tags'), 'post_tags_meta_box', 'post', 'side', 'core');
/**
* Display add post media and current post media form fields and images.
*
* @todo Complete.
* @since 2.7.0
*
* @param object $post
*/
function post_media_meta_box($post) {
echo "<p><small><em>This feature isn't fully functional in this prototype.</em></small></p>";
if ( empty( $post->ID ) )
return;
$atts = get_children( array(
'post_parent' => $post->ID,
'post_type' => 'attachment'
) );
if ( !$atts ) {
_e( 'No media.' );
return;
}
foreach ( $atts as $att ) {
if ( $thumb = wp_get_attachment_image( $att->ID, array(60, 45), true ) ) {
?>
<a href="media.php?action=edit&amp;attachment_id=<?php echo $att->ID ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $att->post_title)); ?>">
<?php echo $thumb; ?>
</a>
<?php
}
echo "<h4>$att->post_title</h4>";
echo "<a href='#' class='no-crazy'>Remove</a> | ";
echo "<a href='media.php?action=edit&amp;attachment_id=$att->ID'>Edit</a>";
echo "<br class='clear' />";
}
}
add_meta_box( 'mediadiv', __('Media' ), 'post_media_meta_box', 'post', 'side', 'core' );
/**
* Display post categories form fields.
*