Filter hook 'site_icon_meta_tags'

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

View Source

site_icon_meta_tags

Filter Hook
Description
Filters the site icon meta tags, so plugins can add their own.

Hook Information

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

Hook Parameters

Type Name Description
string[] $meta_tags Array of Site Icon meta tags.

Usage Examples

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

function my_custom_filter($meta_tags) {
    // Your custom filtering logic here
    return $meta_tags;
}

Source Code Context

wp-includes/general-template.php:3594 - How this hook is used in WordPress core
<?php
3589  	 *
3590  	 * @since 4.3.0
3591  	 *
3592  	 * @param string[] $meta_tags Array of Site Icon meta tags.
3593  	 */
3594  	$meta_tags = apply_filters( 'site_icon_meta_tags', $meta_tags );
3595  	$meta_tags = array_filter( $meta_tags );
3596  
3597  	foreach ( $meta_tags as $meta_tag ) {
3598  		echo "$meta_tag\n";
3599  	}

PHP Documentation

<?php
/**
	 * Filters the site icon meta tags, so plugins can add their own.
	 *
	 * @since 4.3.0
	 *
	 * @param string[] $meta_tags Array of Site Icon meta tags.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/general-template.php
Related Hooks

Related hooks will be displayed here in future updates.