WordPress.org

Make WordPress Core

Ticket #22553: 22553.patch

File 22553.patch, 1.1 KB (added by azaozz, 6 years ago)
  • wp-admin/includes/ajax-actions.php

     
    19321932                wp_send_json_error();
    19331933
    19341934        $html = isset( $attachment['title'] ) ? $attachment['title'] : '';
     1935        $rel = '';
    19351936        if ( ! empty( $attachment['url'] ) ) {
    1936                 $rel = '';
    19371937                if ( strpos($attachment['url'], 'attachment_id') || get_attachment_link( $id ) == $attachment['url'] )
    19381938                        $rel = ' rel="attachment wp-att-' . $id . '"';
    19391939                $html = '<a href="' . esc_url( $attachment['url'] ) . '"' . $rel . '>' . $html . '</a>';
     
    19421942        remove_filter( 'media_send_to_editor', 'image_media_send_to_editor', 10, 3 );
    19431943
    19441944        if ( 'image' === substr( $post->post_mime_type, 0, 5 ) ) {
    1945                 $url = $attachment['url'];
     1945                $url = isset( $attachment['url'] ) ? $attachment['url'] : '';
    19461946                $align = isset( $attachment['image-align'] ) ? $attachment['image-align'] : 'none';
    19471947                $size = isset( $attachment['image-size'] ) ? $attachment['image-size'] : 'medium';
    19481948                $alt = isset( $attachment['image-alt'] ) ? $attachment['image-alt'] : '';