WordPress.org

Make WordPress Core

Changeset 7652


Ignore:
Timestamp:
04/14/2008 04:32:04 PM (10 years ago)
Author:
ryan
Message:

Add some actions and filters to the media uploader. Props tellyworth. fixes #6658 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r7651 r7652  
    788788<?php } ?>
    789789</div>
     790
     791<?php do_action('pre-upload-ui'); ?>
     792
    790793<?php if ( $flash ) : ?>
    791794<script type="text/javascript">
     
    823826</script>
    824827
    825 
    826828<div id="flash-upload-ui">
     829<?php do_action('pre-flash-upload-ui'); ?>
    827830    <p><input id="flash-browse-button" type="button" value="<?php _e('Choose files to upload'); ?>" class="button" /></p>
    828     <p><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
     831<?php do_action('post-flash-upload-ui'); ?>
     832    <p class="howto"><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
    829833</div>
    830834
     
    832836
    833837<div id="html-upload-ui">
     838<?php do_action('pre-html-upload-ui'); ?>
    834839    <p>
    835840    <input type="file" name="async-upload" id="async-upload" /> <input type="submit" class="button" name="html-upload" value="<?php echo attribute_escape(__('Upload')); ?>" /> <a href="#" onClick="return top.tb_remove();"><?php _e('Cancel'); ?></a>
     
    840845    <p><?php _e('If you want to use all capabilities of the uploader, like uploading multiple files at once, please upgrade to lighttpd 1.5.'); ?></p>
    841846    <?php endif;?>
     847<?php do_action('post-html-upload-ui'); ?>
    842848</div>
     849<?php do_action('post-upload-ui'); ?>
    843850<?php
    844851}
     
    850857
    851858    $form_action_url = get_option('siteurl') . "/wp-admin/media-upload.php?type=$type&tab=type&post_id=$post_id";
     859    $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type);
    852860
    853861    $callback = "type_form_$type";
Note: See TracChangeset for help on using the changeset viewer.