WordPress.org

Make WordPress Core

Ticket #12330: post.php.diff

File post.php.diff, 995 bytes (added by ssandison, 5 years ago)
  • C:/xampp/htdocs/intranet/wp-includes/post.php

     
    3405                 if ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) { //Get upload directory 
     3405         
     3406                // Files path 
     3407                $uploads = wp_upload_dir(); 
     3408                $file_path = explode('wp-content', $uploads['basedir']); 
     3409                $file_path = 'wp-content' . $file_path[1]; 
     3410         
     3411                if ( $uploads && false === $uploads['error'] ) { //Get upload directory 
     
    3408             elseif ( false !== strpos($file, 'wp-content/uploads') ) 
    3409                 $url = $uploads['baseurl'] . substr( $file, strpos($file, 'wp-content/uploads') + 18 ); 
     3414                        elseif ( false !== strpos($file, $file_path) ) 
     3415                                $url = $uploads['baseurl'] . substr( $file, strpos($file, $file_path) + strlen($file_path) ); 
     
     3418