Media: Pass the `$rel` parameter to `image_send_to_editor` filter.

Props mihdan, pputzer.
Fixes #50765.
Built from https://develop.svn.wordpress.org/trunk@48684


git-svn-id: http://core.svn.wordpress.org/trunk@48446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-07-28 21:21:05 +00:00
parent 7ad3de836f
commit c5ef3b7976
2 changed files with 4 additions and 2 deletions

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;
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-alpha-48683';
$wp_version = '5.6-alpha-48684';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.