From 014b40e62385830113109a89aa3596208428f34b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 28 Jul 2020 21:19:53 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/media.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index 3daa4a2ad1..d206aa163c 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -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; }