site_icon_url

Displays the Site Icon URL.

Description

site_icon_url( (int) $size = 512, (string) $url = '', (int) $blog_id = 0 ); 

Parameters (3)

0. $size — Optional. (int) => 512
Size of the site icon. Default 512 (pixels).
1. $url — Optional. (string) => ''
Fallback url if no site icon is found. Default empty.
2. $blog_id — Optional. (int)
ID of the blog to get the site icon for. Default current blog.

Usage

  1. if ( !function_exists( 'site_icon_url' ) ) { 
  2. require_once ABSPATH . WPINC . '/general-template.php'; 
  3.  
  4. // Optional. Size of the site icon. Default 512 (pixels). 
  5. $size = 512; 
  6.  
  7. // Optional. Fallback url if no site icon is found. Default empty. 
  8. $url = ''; 
  9.  
  10. // Optional. ID of the blog to get the site icon for. Default current blog. 
  11. $blog_id = -1; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = site_icon_url($size, $url, $blog_id); 
  15.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/general-template.php  
  1. function site_icon_url( $size = 512, $url = '', $blog_id = 0 ) { 
  2. echo esc_url( get_site_icon_url( $size, $url, $blog_id ) );