media_buttons
Action HookDescription
Fires after the default media button(s) are displayed.Hook Information
File Location |
wp-includes/class-wp-editor.php
View on GitHub
|
Hook Type | Action |
Line Number | 240 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$editor_id
|
Unique editor identifier, e.g. 'content'. |
Usage Examples
Basic Usage
<?php
// Hook into media_buttons
add_action('media_buttons', 'my_custom_function', 10, 1);
function my_custom_function($editor_id) {
// Your custom code here
}
Source Code Context
wp-includes/class-wp-editor.php:240
- How this hook is used in WordPress core
<?php
235 *
236 * @since 2.5.0
237 *
238 * @param string $editor_id Unique editor identifier, e.g. 'content'.
239 */
240 do_action( 'media_buttons', $editor_id );
241 echo "</div>\n";
242 }
243
244 echo '<div class="wp-editor-tabs">' . $buttons . "</div>\n";
245 echo "</div>\n";
PHP Documentation
<?php
/**
* Fires after the default media button(s) are displayed.
*
* @since 2.5.0
*
* @param string $editor_id Unique editor identifier, e.g. 'content'.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-includes/class-wp-editor.php
Related Hooks
Related hooks will be displayed here in future updates.