Changeset 33606 for trunk/src/wp-includes/general-template.php
- Timestamp:
- 08/11/2015 04:24:07 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r33605 r33606 731 731 */ 732 732 function get_site_icon_url( $size = 512, $url = '', $blog_id = 0 ) { 733 if ( function_exists( 'get_blog_option' ) ) { 734 if ( ! $blog_id ) { 735 $blog_id = get_current_blog_id(); 736 } 733 if ( $blog_id && is_multisite() ) { 737 734 $site_icon_id = get_blog_option( $blog_id, 'site_icon' ); 738 735 } else { … … 740 737 } 741 738 742 if ( $site_icon_id 739 if ( $site_icon_id ) { 743 740 if ( $size >= 512 ) { 744 741 $size_data = 'full'; … … 747 744 } 748 745 $url_data = wp_get_attachment_image_src( $site_icon_id, $size_data ); 749 $url = $url_data[0]; 746 if ( $url_data ) { 747 $url = $url_data[0]; 748 } 750 749 } 751 750 … … 771 770 */ 772 771 function has_site_icon( $blog_id = 0 ) { 773 return !!get_site_icon_url( 512, '', $blog_id );772 return (bool) get_site_icon_url( 512, '', $blog_id ); 774 773 } 775 774
Note: See TracChangeset
for help on using the changeset viewer.