WordPress.org

Make WordPress Core

Changeset 18894


Ignore:
Timestamp:
10/05/2011 10:36:03 PM (10 years ago)
Author:
nacin
Message:

type_url_form_image() becomes wp_media_insert_url_form(), media_upload_image() becomes wp_media_upload_handler(). type_url_form_* and media_upload_* are restored as wrappers. Don't deprecate yet. see #17578.

File:
1 edited

Legend:

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

    r18890 r18894  
    500500 * @return unknown
    501501 */
    502 function media_upload_image() {
     502function wp_media_upload_handler() {
    503503    $errors = array();
    504504    $id = 0;
     
    15471547<div id="media-items">
    15481548<div class="media-item media-blank">
    1549 <?php echo apply_filters( 'type_url_form_media', type_url_form_image( $type ) ); ?>
     1549<?php echo apply_filters( 'type_url_form_media', wp_media_insert_url_form( $type ) ); ?>
    15501550</div>
    15511551</div>
     
    18651865 * @return unknown
    18661866 */
    1867 function type_url_form_image( $default_view = 'image' ) {
     1867function wp_media_insert_url_form( $default_view = 'image' ) {
    18681868    if ( !apply_filters( 'disable_captions', '' ) ) {
    18691869        $caption = '
     
    20062006add_filter('async_upload_file', 'get_media_item', 10, 2);
    20072007
    2008 add_action('media_upload_image', 'media_upload_image');
    2009 add_action('media_upload_audio', 'media_upload_image');
    2010 add_action('media_upload_video', 'media_upload_image');
    2011 add_action('media_upload_file', 'media_upload_image');
     2008add_action( 'media_upload_image', 'wp_media_upload_handler' );
     2009add_action( 'media_upload_audio', 'wp_media_upload_handler' );
     2010add_action( 'media_upload_video', 'wp_media_upload_handler' );
     2011add_action( 'media_upload_file',  'wp_media_upload_handler' );
    20122012
    20132013add_filter('media_upload_gallery', 'media_upload_gallery');
    20142014
    20152015add_filter('media_upload_library', 'media_upload_library');
     2016
     2017function media_upload_image() {
     2018    return wp_media_upload_handler();
     2019}
     2020
     2021function media_upload_audio() {
     2022    return wp_media_upload_handler();
     2023}
     2024
     2025function media_upload_video() {
     2026    return wp_media_upload_handler();
     2027}
     2028
     2029function media_upload_file() {
     2030    return wp_media_upload_handler();
     2031}
     2032
     2033function type_url_form_image() {
     2034    return wp_media_insert_url_form( 'image' );
     2035}
     2036
     2037function type_url_form_audio() {
     2038    return wp_media_insert_url_form( 'audio' );
     2039}
     2040
     2041function type_url_form_video() {
     2042    return wp_media_insert_url_form( 'video' );
     2043}
     2044
     2045function type_url_form_file() {
     2046    return wp_media_insert_url_form( 'file' );
     2047}
Note: See TracChangeset for help on using the changeset viewer.