Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: media_upload_form_url

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
1332  * @param unknown_type $errors
1333  * @param unknown_type $id
1334  */
1335 function media_upload_type_form($type = 'file', $errors = null, $id = null) {
1336      media_upload_header();
1337
1338      $post_id = intval($_REQUEST['post_id']);
1339
1340      $form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id");
1341      $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type);
1342 ?>
1343
1344 <form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form type-form validate" id="<?php echo $type; ?>-form">
1345 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
1346 <?php wp_nonce_field('media-form'); ?>
1347
1348 <h3 class="media-title"><?php _e('Add media files from your computer'); ?></h3>
1349
1350 <?php media_upload_form( $errors ); ?>
 
Line Code
1385  * @param unknown_type $errors
1386  * @param unknown_type $id
1387  */
1388 function media_upload_type_url_form($type = 'file', $errors = null, $id = null) {
1389      media_upload_header();
1390
1391      $post_id = intval($_REQUEST['post_id']);
1392
1393      $form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id");
1394      $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type);
1395
1396      $callback = "type_url_form_$type";
1397 ?>
1398
1399 <form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form type-form validate" id="<?php echo $type; ?>-form">
1400 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
1401 <?php wp_nonce_field('media-form'); ?>
1402
1403 <?php if ( is_callable($callback) ) { ?>