Ticket #24609: wp_ajax_send_attachment_to_editor.diff
File wp_ajax_send_attachment_to_editor.diff, 1.1 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/ajax-actions.php
1992 1992 $url = $attachment['url']; 1993 1993 if ( strpos( $url, 'attachment_id') || get_attachment_link( $id ) == $url ) 1994 1994 $rel = ' rel="attachment wp-att-' . $id . '"'; 1995 if ( empty( $html ) ) 1996 $html = esc_url( $url ); 1995 1997 $html = '<a href="' . esc_url( $url ) . '"' . $rel . '>' . $html . '</a>'; 1996 1998 } 1997 1999 … … 2004 2006 $caption = isset( $attachment['post_excerpt'] ) ? $attachment['post_excerpt'] : ''; 2005 2007 $title = ''; // We no longer insert title tags into <img> tags, as they are redundant. 2006 2008 $html = get_image_send_to_editor( $id, $caption, $title, $align, $url, (bool) $rel, $size, $alt ); 2007 } elseif ( 'video' === substr( $post->post_mime_type, 0, 5 ) || 'audio' === substr( $post->post_mime_type, 0, 5 )) {2009 } elseif ( empty( $html ) && ( 'video' === substr( $post->post_mime_type, 0, 5 ) || 'audio' === substr( $post->post_mime_type, 0, 5 ) ) ) { 2008 2010 $html = stripslashes_deep( $_POST['html'] ); 2009 2011 } 2010 2012