Make WordPress Core


Ignore:
Timestamp:
10/22/2010 08:17:17 PM (14 years ago)
Author:
ryan
Message:

Default send to editor to true if the post parent is empty. Props blepoxp. fixes #14133

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r15858 r15920  
    11141114
    11151115    $post = get_post( $attachment_id );
    1116 
    1117     $default_args = array( 'errors' => null, 'send' => post_type_supports(get_post_type($post->post_parent), 'editor'), 'delete' => true, 'toggle' => true, 'show_title' => true );
     1116   
     1117    $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 );
    11181118    $args = wp_parse_args( $args, $default_args );
    11191119    extract( $args, EXTR_SKIP );
Note: See TracChangeset for help on using the changeset viewer.