Media: Pass the $rel parameter to image_send_to_editor filter.

Props mihdan, pputzer.
Fixes #50765.

git-svn-id: https://develop.svn.wordpress.org/trunk@48684 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-07-28 21:19:53 +00:00
parent 7aae3c7bbf
commit 014b40e623

View File

@ -152,6 +152,7 @@ function get_image_send_to_editor( $id, $caption, $title, $align, $url = '', $re
* Filters the image HTML markup to send to the editor when inserting an image.
*
* @since 2.5.0
* @since 5.6.0 The `$rel` parameter was added.
*
* @param string $html The image HTML markup to send.
* @param int $id The attachment ID.
@ -162,8 +163,9 @@ function get_image_send_to_editor( $id, $caption, $title, $align, $url = '', $re
* @param string|array $size Size of image. Image size or array of width and height values
* (in that order). Default 'medium'.
* @param string $alt The image alternative, or alt, text.
* @param string $rel The image rel attribute.
*/
$html = apply_filters( 'image_send_to_editor', $html, $id, $caption, $title, $align, $url, $size, $alt );
$html = apply_filters( 'image_send_to_editor', $html, $id, $caption, $title, $align, $url, $size, $alt, $rel );
return $html;
}