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

Line Code
960 <?php
961 }
962
963 function media_upload_type_form($type = 'file', $errors = null, $id = null) {
964      media_upload_header();
965
966      $post_id = intval($_REQUEST['post_id']);
967
968      $form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id");
969      $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type);
970
971      $callback = "type_form_$type";
972 ?>
973
974 <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">
975 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
976 <?php wp_nonce_field('media-form'); ?>
977 <h3><?php _e('From Computer'); ?></h3>
978 <?php media_upload_form( $errors ); ?>