media_buttons WordPress Action Hook

The media_buttons hook allows you to add custom buttons to the WordPress Media Library. This hook is typically used to add custom buttons for things like adding shortcodes or custom fields to a post.

do_action( 'media_buttons', string $editor_id ) #

Fires after the default media button(s) are displayed.


Parameters

$editor_id

(string)Unique editor identifier, e.g. 'content'.


Top ↑

Source

File: wp-includes/class-wp-editor.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.