apply_filters( 'image_send_to_editor_url', string $html, string $src, string $alt, string $align )
- Since
- 2.8.0
Filters the image URL sent to the editor.
Compatibility
- WordPress
- since 2.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$htmlstring- HTML markup sent to the editor for an image.
$srcstring- Image source URL.
$altstring- Image alternate, or alt, text.
$alignstring- The image alignment. Default 'alignnone'. Possible values include 'alignleft', 'aligncenter', 'alignright', 'alignnone'.
Where this hook fires · 1
wp-admin/includes/media.php:959wp_media_upload_handler()
Source code
* @param string $html HTML markup sent to the editor for an image. * @param string $src Image source URL. * @param string $alt Image alternate, or alt, text. * @param string $align The image alignment. Default 'alignnone'. Possible values include * 'alignleft', 'aligncenter', 'alignright', 'alignnone'. */ $html = apply_filters( 'image_send_to_editor_url', $html, sanitize_url( $src ), $alt, $align ); } return media_send_to_editor( $html ); } if ( isset( $_POST['save'] ) ) {Changelog
Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.