WordPress.org

Make WordPress Core

Ticket #23711: media.php.diff

File media.php.diff, 636 bytes (added by norcross, 14 months ago)

updated to use ABSPATH method

  • media.php

     
    191191} 
    192192 
    193193/** 
     194 * Wrapper for adding required files in media_sideload_image from non wp-admin locations 
     195 * 
     196 * @since 
     197 * 
     198 */ 
     199function external_media_load() { 
     200 
     201    require_once(ABSPATH . 'wp-admin' . '/includes/image.php'); 
     202    require_once(ABSPATH . 'wp-admin' . '/includes/file.php'); 
     203    require_once(ABSPATH . 'wp-admin' . '/includes/media.php'); 
     204 
     205} 
     206 
     207 
     208/** 
    194209 * This handles the file upload POST itself, creating the attachment post. 
    195210 * 
    196211 * @since 2.5.0