media_upload_image
The WordPress Core media upload image hook.
Description
Parameters (1)
- 0. $wp_media_upload_handler (string) =>
'wp_media_upload_handler'
- The
wp
media upload handler.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'media_upload_image', $wp_media_upload_handler );
- The following example is for adding a hook callback.
- // define the media_upload_image callback
- function action_media_upload_image( $wp_media_upload_handler ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'media_upload_image', 'action_media_upload_image', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'media_upload_image', 'action_media_upload_image', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-admin/includes/admin-filters.php
- add_action( 'media_upload_image', 'wp_media_upload_handler' );