Use the correct field when determining if the parent can support the Post Editor. See #12792
git-svn-id: https://develop.svn.wordpress.org/trunk@14146 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
044eb3afba
commit
f72a1d860a
@ -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 );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user