media_send_to_editor WordPress Filter Hook

The media_send_to_editor hook is used to send HTML content to the editor after inserting media into the post. The hook can be used to add custom functionality or to modify the default behavior.

apply_filters( 'media_send_to_editor', string $html, int $send_id, array $attachment ) #

Filters the HTML markup for a media item sent to the editor.


Description

Top ↑

See also


Top ↑

Parameters

$html

(string)HTML markup for a media item sent to the editor.

$send_id

(int)The first key from the $_POST['send'] data.

$attachment

(array)Array of attachment metadata.


Top ↑

Source

File: wp-admin/includes/media.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More