media_buttons action-hookWP 2.5.0

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

Usage

add_action( 'media_buttons', 'wp_kama_media_buttons_action' );

/**
 * Function for `media_buttons` action-hook.
 * 
 * @param string $editor_id Unique editor identifier, e.g. 'content'.
 *
 * @return void
 */
function wp_kama_media_buttons_action( $editor_id ){

	// action...
}
$editor_id(string)
Unique editor identifier, e.g. 'content'.

Changelog

Since 2.5.0 Introduced.

Where the hook is called

_WP_Editors::editor()
media_buttons
wp-includes/class-wp-editor.php 236
do_action( 'media_buttons', $editor_id );

Where the hook is used in WordPress

wp-includes/default-filters.php 669
add_action( 'media_buttons', 'media_buttons' );