Changeset 38786 for trunk/src/wp-includes/general-template.php
- Timestamp:
- 10/13/2016 10:27:15 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r38764 r38786 784 784 */ 785 785 function get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) { 786 if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) { 786 $switched_blog = false; 787 788 if ( is_multisite() && ! empty( $blog_id ) && (int) $blog_id !== get_current_blog_id() ) { 787 789 switch_to_blog( $blog_id ); 790 $switched_blog = true; 788 791 } 789 792 … … 799 802 } 800 803 801 if ( is_multisite() && ms_is_switched()) {804 if ( $switched_blog ) { 802 805 restore_current_blog(); 803 806 } … … 849 852 */ 850 853 function has_custom_logo( $blog_id = 0 ) { 851 if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) { 854 $switched_blog = false; 855 856 if ( is_multisite() && ! empty( $blog_id ) && (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 } … … 872 878 function get_custom_logo( $blog_id = 0 ) { 873 879 $html = ''; 874 875 if ( is_multisite() && (int) $blog_id !== get_current_blog_id() ) { 880 $switched_blog = false; 881 882 if ( is_multisite() && ! empty( $blog_id ) && (int) $blog_id !== get_current_blog_id() ) { 876 883 switch_to_blog( $blog_id ); 884 $switched_blog = true; 877 885 } 878 886 … … 897 905 } 898 906 899 if ( is_multisite() && ms_is_switched()) {907 if ( $switched_blog ) { 900 908 restore_current_blog(); 901 909 }
Note: See TracChangeset
for help on using the changeset viewer.