[wp-trac] [WordPress Trac] #40072: URL from wp_get_attachment_image_src on multisite is wrong
    WordPress Trac 
    noreply at wordpress.org
       
    Wed Mar  8 17:42:33 UTC 2017
    
    
  
#40072: URL from wp_get_attachment_image_src on multisite is wrong
--------------------------+-----------------------------
 Reporter:  contremaitre  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.7.3
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 wp_get_attachment_image_src returns the URL from the main site instead of
 the site currently visited, in case of multisite setup.
 I tracked down the issue, up to :
 - image_downsize in wp-includes/media.php
 - wp_get_attachment_url in wp-includes/post.php
 - wp_get_upload_dir in functions.php
 The wp_get_upload_dir URL and BASEURL in the returned array have the main
 site url instead of the multise one.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40072>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list