media_upload_form_url

Filters the media upload form action URL.

Description

apply_filters( 'media_upload_form_url', (string) $form_action_url, (string) $type ); 

Parameters (2)

0. $form_action_url (string)
The media upload form action URL.
1. $type (string)
The type of media. Default file..

Usage

To run the hook, copy the example below.
  1. $form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type ); 
  2.  
  3. if ( !empty( $form_action_url ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the media_upload_form_url callback 
  2. function filter_media_upload_form_url( $form_action_url, $type ) { 
  3. // make filter magic happen here... 
  4. return $form_action_url
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'media_upload_form_url', 'filter_media_upload_form_url', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'media_upload_form_url', 'filter_media_upload_form_url', 10, 2 ); 

Defined (4)

The filter is defined in the following location(s).

/wp-admin/includes/media.php  
  1. $form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type ); 
  1. $form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type ); 
  1. $form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type ); 
  1. $form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type );