Use the correct field when determining if the parent can support the Post Editor. See #12792

git-svn-id: http://svn.automattic.com/wordpress/trunk@14146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-04-18 09:09:45 +00:00
parent 3eec9dd73f
commit 18a81ac245
1 changed files with 3 additions and 3 deletions

View File

@ -1161,15 +1161,15 @@ function get_media_item( $attachment_id, $args = null ) {
else
$thumb_url = false;
$default_args = array( 'errors' => null, 'send' => post_type_supports(get_post_type($_GET['post_id']), 'editor'), 'delete' => true, 'toggle' => true, 'show_title' => true );
$post = get_post( $attachment_id );
$default_args = array( 'errors' => null, 'send' => post_type_supports(get_post_type($post->post_parent), 'editor'), 'delete' => true, 'toggle' => true, 'show_title' => true );
$args = wp_parse_args( $args, $default_args );
extract( $args, EXTR_SKIP );
$toggle_on = __( 'Show' );
$toggle_off = __( 'Hide' );
$post = get_post( $attachment_id );
$filename = basename( $post->guid );
$title = esc_attr( $post->post_title );