Ticket #34359: 34359.2.patch
File 34359.2.patch, 1.0 KB (added by , 7 years ago) |
---|
-
src/wp-includes/functions.php
1800 1800 * 'error' - set to false. 1801 1801 * 1802 1802 * @since 2.0.0 1803 * @uses _wp_upload_dir() 1803 1804 * 1804 1805 * @param string $time Optional. Time formatted in 'yyyy/mm'. Default null. 1805 1806 * @return array See above for description. 1806 1807 */ 1807 1808 function wp_upload_dir( $time = null ) { 1809 static $cache = array(); 1810 $key = sprintf( '%d-%s', get_current_blog_id(), (string) $time ); 1811 1812 if ( empty( $cache[ $key ] ) ) { 1813 $cache[ $key ] = _wp_upload_dir( $time ); 1814 } 1815 1816 return $cache[ $key ]; 1817 } 1818 1819 /** 1820 * A non-cached version of wp_upload_dir(). 1821 * 1822 * @access private 1823 * 1824 * @param string $time Optional. Time formatted in 'yyyy/mm'. Default null. 1825 * @return array See wp_upload_dir() 1826 */ 1827 function _wp_upload_dir( $time = null ) { 1808 1828 $siteurl = get_option( 'siteurl' ); 1809 1829 $upload_path = trim( get_option( 'upload_path' ) ); 1810 1830