Default send to editor to true if the post parent is empty. Props blepoxp. fixes #14133
git-svn-id: https://develop.svn.wordpress.org/trunk@15920 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
efdb066697
commit
6f62e4f13c
@ -1113,8 +1113,8 @@ function get_media_item( $attachment_id, $args = null ) {
|
||||
$thumb_url = false;
|
||||
|
||||
$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 );
|
||||
|
||||
$default_args = array( 'errors' => null, 'send' => $post->post_parent ? post_type_supports( get_post_type( $post->post_parent ), 'editor' ) : true, 'delete' => true, 'toggle' => true, 'show_title' => true );
|
||||
$args = wp_parse_args( $args, $default_args );
|
||||
extract( $args, EXTR_SKIP );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user