Ticket #25449: 25449.2.diff
File 25449.2.diff, 1.8 KB (added by , 9 years ago) |
---|
-
wp-includes/functions.php
1846 1846 * @param string $time Optional. Time formatted in 'yyyy/mm'. Default null. 1847 1847 * @param bool $create_dir Optional. Whether to check and create the uploads directory. Default true (backwards compatible). 1848 1848 * @param bool $refresh_cache Optional. Whether to refresh the cache. Default false. 1849 * @param string $scheme Optional. Scheme to give the upload url context. See set_url_scheme(). 1849 1850 * @return array See above for description. 1850 1851 */ 1851 function wp_upload_dir( $time = null, $create_dir = true, $refresh_cache = false ) {1852 function wp_upload_dir( $time = null, $create_dir = true, $refresh_cache = false, $scheme = null ) { 1852 1853 static $cache = array(); 1853 1854 1854 1855 $key = sprintf( '%d-%s', get_current_blog_id(), (string) $time ); … … 1856 1857 if ( $refresh_cache || empty( $cache[ $key ] ) ) { 1857 1858 $cache[ $key ] = _wp_upload_dir( $time ); 1858 1859 } 1860 1861 $uploads['url'] = set_url_scheme( $uploads['url'], $scheme ); 1862 $uploads['baseurl'] = set_url_scheme( $uploads['baseurl'], $scheme ); 1859 1863 1860 1864 /** 1861 1865 * Filter the uploads directory data. -
wp-includes/media.php
333 333 334 334 list( $img_src, $width, $height ) = image_downsize($id, $size); 335 335 $hwstring = image_hwstring($width, $height); 336 337 // Scheme of the image source URL should match frontend scheme 338 $scheme = parse_url( get_option( 'home' ), PHP_URL_SCHEME ); 339 $img_src = set_url_scheme( $img_src, $scheme ); 336 340 337 341 $title = $title ? 'title="' . esc_attr( $title ) . '" ' : ''; 338 342