Filter hook 'get_custom_logo'

in WP Core File wp-includes/general-template.php at line 1152

View Source

get_custom_logo

Filter Hook
Description
Filters the custom logo output.

Hook Information

File Location wp-includes/general-template.php View on GitHub
Hook Type Filter
Line Number 1152

Hook Parameters

Type Name Description
string $html Custom logo HTML output.
int $blog_id ID of the blog to get the custom logo for.

Usage Examples

Basic Usage
<?php
// Hook into get_custom_logo
add_filter('get_custom_logo', 'my_custom_filter', 10, 2);

function my_custom_filter($html, $blog_id) {
    // Your custom filtering logic here
    return $html;
}

Source Code Context

wp-includes/general-template.php:1152 - How this hook is used in WordPress core
<?php
1147  	 * @since 4.6.0 Added the `$blog_id` parameter.
1148  	 *
1149  	 * @param string $html    Custom logo HTML output.
1150  	 * @param int    $blog_id ID of the blog to get the custom logo for.
1151  	 */
1152  	return apply_filters( 'get_custom_logo', $html, $blog_id );
1153  }
1154  
1155  /**
1156   * Displays a custom logo, linked to home unless the theme supports removing the link on the home page.
1157   *

PHP Documentation

<?php
/**
	 * Filters the custom logo output.
	 *
	 * @since 4.5.0
	 * @since 4.6.0 Added the `$blog_id` parameter.
	 *
	 * @param string $html    Custom logo HTML output.
	 * @param int    $blog_id ID of the blog to get the custom logo for.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/general-template.php
Related Hooks

Related hooks will be displayed here in future updates.