WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/09/2009 03:39:20 PM (11 years ago)
Author:
ryan
Message:

Allow registering post image support per post type. fixes #11364

File:
1 edited

Legend:

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

    r12344 r12350  
    12401240
    12411241    $thumbnail = '';
    1242     if ( 'image' == $type && current_theme_supports( 'post-images' ) && get_post_image_id($_GET['post_id']) != $attachment_id )
     1242    if ( 'image' == $type && isset($_GET['post_id']) && current_theme_supports( 'post-images', get_post_type($_GET['post_id']) ) && get_post_image_id($_GET['post_id']) != $attachment_id )
    12431243        $thumbnail = "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as post image" ) . "</a>";
    12441244
Note: See TracChangeset for help on using the changeset viewer.