WordPress.org

Make WordPress Core

Changeset 14146


Ignore:
Timestamp:
04/18/10 09:09:45 (4 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

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

    r14118 r14146  
    11621162        $thumb_url = false; 
    11631163 
    1164     $default_args = array( 'errors' => null, 'send' => post_type_supports(get_post_type($_GET['post_id']), 'editor'), 'delete' => true, 'toggle' => true, 'show_title' => true ); 
     1164    $post = get_post( $attachment_id ); 
     1165 
     1166    $default_args = array( 'errors' => null, 'send' => post_type_supports(get_post_type($post->post_parent), 'editor'), 'delete' => true, 'toggle' => true, 'show_title' => true ); 
    11651167    $args = wp_parse_args( $args, $default_args ); 
    11661168    extract( $args, EXTR_SKIP ); 
     
    11681170    $toggle_on  = __( 'Show' ); 
    11691171    $toggle_off = __( 'Hide' ); 
    1170  
    1171     $post = get_post( $attachment_id ); 
    11721172 
    11731173    $filename = basename( $post->guid ); 
Note: See TracChangeset for help on using the changeset viewer.