WordPress.org

Make WordPress Core

Changeset 12059


Ignore:
Timestamp:
10/19/2009 04:36:21 PM (9 years ago)
Author:
markjaquith
Message:

Only show Use for thumbnail link for image attachments. see #10928

File:
1 edited

Legend:

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

    r12055 r12059  
    11521152        $keys = array_keys(wp_match_mime_types(array_keys($post_mime_types), $post->post_mime_type));
    11531153        $type = array_shift($keys);
    1154         $type = "<input type='hidden' id='type-of-$attachment_id' value='" . esc_attr( $type ) . "' />";
     1154        $type_html = "<input type='hidden' id='type-of-$attachment_id' value='" . esc_attr( $type ) . "' />";
    11551155    }
    11561156
     
    11611161        $toggle_links = "
    11621162    <a class='toggle describe-toggle-on' href='#'>$toggle_on</a>
    1163     <a class='toggle describe-toggle-off' href='#'>$toggle_off</a>
    1164     <a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"" . intval( $attachment_id ) . "\");return false;'>" . esc_html__( "Use for thumbnail" ) . "</a>";
     1163    <a class='toggle describe-toggle-off' href='#'>$toggle_off</a>";
     1164    if ( 'image' == $type )
     1165        $toggle_links .= "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"" . intval( $attachment_id ) . "\");return false;'>" . esc_html__( "Use for thumbnail" ) . "</a>";
    11651166    } else {
    11661167        $class = 'form-table';
     
    11981199
    11991200    $item = "
    1200     $type
     1201    $type_html
    12011202    $toggle_links
    12021203    $order
Note: See TracChangeset for help on using the changeset viewer.