Punt media box

git-svn-id: https://develop.svn.wordpress.org/trunk@9171 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-10-14 17:29:38 +00:00
parent 48f54b2622
commit bca6199b30
1 changed files with 0 additions and 44 deletions

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.
*