From 18a81ac245404cec7f3ba080bddae8950cf7da0c Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 18 Apr 2010 09:09:45 +0000 Subject: [PATCH] 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 --- wp-admin/includes/media.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index c196fdee31..7f6fb498d0 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -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 );