WordPress.org

Make WordPress Core

Ticket #14630: wp_featured_product.diff

File wp_featured_product.diff, 1.2 KB (added by jghazally, 4 years ago)
  • wp-admin/includes/media.php

     
    12911291                $calling_post_id = $post->post_parent; 
    12921292        if ( 'image' == $type && $calling_post_id && current_theme_supports( 'post-thumbnails', get_post_type( $calling_post_id ) ) && get_post_thumbnail_id( $calling_post_id ) != $attachment_id ) { 
    12931293                $ajax_nonce = wp_create_nonce( "set_post_thumbnail-$calling_post_id" ); 
    1294                 $thumbnail = "<a class='wp-post-thumbnail' id='wp-post-thumbnail-" . $attachment_id . "' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\", \"$ajax_nonce\");return false;'>" . esc_html__( "Use as featured image" ) . "</a>"; 
     1294                $link_text['text'] = esc_html__( "Use as featured image" ) ; 
     1295                $link_text = apply_filters('media_feature_image_text', array( 'text' =>$link_text['text'], 'post-type' => get_post_type( $calling_post_id ))); 
     1296                $thumbnail = "<a class='wp-post-thumbnail' id='wp-post-thumbnail-" . $attachment_id . "' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\", \"$ajax_nonce\");return false;'>" . $link_text['text'] . "</a>"; 
    12951297        } 
    12961298 
    12971299        if ( ( $send || $thumbnail || $delete ) && !isset( $form_fields['buttons'] ) )