Ticket #38253: 38253-notests.patch
File 38253-notests.patch, 1.6 KB (added by , 8 years ago) |
---|
-
wp-includes/general-template.php
783 783 * @return string Site Icon URL. 784 784 */ 785 785 function get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) { 786 $switched_blog = false; 787 786 788 if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) { 787 789 switch_to_blog( $blog_id ); 790 $switched_blog = true; 788 791 } 789 792 790 793 $site_icon_id = get_option( 'site_icon' ); … … 798 801 $url = wp_get_attachment_image_url( $site_icon_id, $size_data ); 799 802 } 800 803 801 if ( is_multisite() && ms_is_switched()) {804 if ( $switched_blog ) { 802 805 restore_current_blog(); 803 806 } 804 807 … … 848 851 * @return bool Whether the site has a custom logo or not. 849 852 */ 850 853 function has_custom_logo( $blog_id = 0 ) { 854 $switched_blog = false; 855 851 856 if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) { 852 857 switch_to_blog( $blog_id ); 858 $switched_blog = true; 853 859 } 854 860 855 861 $custom_logo_id = get_theme_mod( 'custom_logo' ); 856 862 857 if ( is_multisite() && ms_is_switched()) {863 if ( $switched_blog ) { 858 864 restore_current_blog(); 859 865 } 860 866 … … 871 877 */ 872 878 function get_custom_logo( $blog_id = 0 ) { 873 879 $html = ''; 880 $switched_blog = false; 874 881 875 882 if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) { 876 883 switch_to_blog( $blog_id ); 884 $switched_blog = true; 877 885 } 878 886 879 887 $custom_logo_id = get_theme_mod( 'custom_logo' ); … … 896 904 ); 897 905 } 898 906 899 if ( is_multisite() && ms_is_switched()) {907 if ( $switched_blog ) { 900 908 restore_current_blog(); 901 909 } 902 910