Filter hook 'emoji_url'

in WP Core File wp-includes/formatting.php at line 6031

View Source

emoji_url

Filter Hook
Description
Converts emoji to a static img element.

Hook Information

File Location wp-includes/formatting.php View on GitHub
Hook Type Filter
Line Number 6031

Hook Parameters

Type Name Description
string $text The content to encode.

Usage Examples

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

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

Source Code Context

wp-includes/formatting.php:6031 - How this hook is used in WordPress core
<?php
6026  	if ( ! $possible_emoji ) {
6027  		return $text;
6028  	}
6029  
6030  	/** This filter is documented in wp-includes/formatting.php */
6031  	$cdn_url = apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/16.0.1/72x72/' );
6032  
6033  	/** This filter is documented in wp-includes/formatting.php */
6034  	$ext = apply_filters( 'emoji_ext', '.png' );
6035  
6036  	$output = '';

PHP Documentation

<?php
/**
 * Converts emoji to a static img element.
 *
 * @since 4.2.0
 *
 * @param string $text The content to encode.
 * @return string The encoded content.
 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/formatting.php
Related Hooks

Related hooks will be displayed here in future updates.