WordPress filter hook · part of WordPress core

media_upload_form_url

A WordPress core filter that 13 plugins also fire themselves, running on 111K+ sites between them.

“This filter is documented in wp-admin/includes/media.php”

How to use media_upload_form_url

It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'media_upload_form_url', function( $form_action_url, $type ) {
	// Change $form_action_url here.
	return $form_action_url;
}, 10, 2 );

Argument names come from Download Manager's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

13 plugins that fire media_upload_form_url

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Download Manager icon Download Manager90,000+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) src/MediaLibrary/views/media-tab.php:9
  2. PowerPress Podcasting plugin by Blubrry icon PowerPress Podcasting plugin by Blubrry20,000+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) powerpressadmin-metabox.php:1709
  3. Upload Media by Zip icon Upload Media by Zip200+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) upload-media-by-zip.php:135
  4. Dreamstime Stock Photos icon Dreamstime Stock Photos200+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) dreamstime.php:820
  5. Canto icon Canto100+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) includes/lib/class-canto-media.php:53
  6. WP Featured Screenshot icon WP Featured Screenshot80+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) wp-featured-screenshot.php:122
  7. s2member Secure File Uploader icon s2member Secure File Uploader80+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) s2member-secure-file-uploader.php:107
  8. CaptureMyPage icon CaptureMyPage20+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) cmp.php:471
  9. DarkOnyx Plugin for WordPress icon DarkOnyx Plugin for WordPress10+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) media/DarkOnyxDatabase.php:42
  10. GWPG3 icon GWPG310+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) wpg3_class_WPG3_Imagechoser.php:134
  11. Zip Embed icon Zip Embed10+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) zip-embed.php:315
  12. Recipe Schema icon Recipe Schema10+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) inc/feature-image-tab.php:186
  13. The Gallery Shortcode icon The Gallery Shortcode10+ installs apply_filters( 'media_upload_form_url', $form_action_url, $type ) init.php:74

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.