Ticket #25650: 25650_approach_1.patch
File 25650_approach_1.patch, 2.3 KB (added by , 9 years ago) |
---|
-
src/wp-content/plugins/hello.php
79 79 80 80 add_action( 'admin_head', 'dolly_css' ); 81 81 82 83 add_action( 'init', 'test' ); 84 function test() { 85 var_dump(wp_upload_dir()); 86 87 switch_to_blog( 7 ); 88 var_dump(wp_upload_dir()); 89 restore_current_blog(); 90 91 wp_die(); 92 } 82 93 ?> -
src/wp-includes/functions.php
1824 1824 1825 1825 if ( !$url = get_option( 'upload_url_path' ) ) { 1826 1826 if ( empty($upload_path) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) ) 1827 $url = WP_CONTENT_URL. '/uploads';1827 $url = content_url() . '/uploads'; 1828 1828 else 1829 1829 $url = trailingslashit( $siteurl ) . $upload_path; 1830 1830 } -
src/wp-includes/link-template.php
3126 3126 * @return string Content url link with optional path appended. 3127 3127 */ 3128 3128 function content_url($path = '') { 3129 $url = set_url_scheme( WP_CONTENT_URL );3129 global $wp_content_url; 3130 3130 3131 if ( empty( $wp_content_url ) ) { 3132 $wp_content_url = WP_CONTENT_URL; 3133 } 3134 3135 $url = set_url_scheme( $wp_content_url ); 3136 3131 3137 if ( $path && is_string( $path ) ) 3132 3138 $url .= '/' . ltrim($path, '/'); 3133 3139 -
src/wp-includes/ms-blogs.php
666 666 $current_user->for_blog( $new_blog ); 667 667 } 668 668 669 // Change the content URL to the new blog 670 global $wp_content_url; 671 672 if ( empty( $wp_content_url ) ) { 673 $wp_content_url = WP_CONTENT_URL; 674 } 675 676 $new_blog_details = get_blog_details( $new_blog ); 677 $prev_blog_details = get_blog_details( $prev_blog_id ); 678 679 $wp_content_url = str_replace( $prev_blog_details->siteurl, $new_blog_details->siteurl, $wp_content_url ); 680 669 681 /** This filter is documented in wp-includes/ms-blogs.php */ 670 682 do_action( 'switch_blog', $new_blog, $prev_blog_id ); 671 683 $GLOBALS['switched'] = true;