Filter hook 'smilies'

in WP Core File wp-includes/functions.php at line 4887

View Source

smilies

Filter Hook
Description
Filters all the smilies. This filter must be added before `smilies_init` is run, as it is normally only run once to setup the smilies regex.

Hook Information

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

Hook Parameters

Type Name Description
string[] $wpsmiliestrans List of the smilies' hexadecimal representations, keyed by their smily code.

Usage Examples

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

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

Source Code Context

wp-includes/functions.php:4887 - How this hook is used in WordPress core
<?php
4882  	 *
4883  	 * @since 4.7.0
4884  	 *
4885  	 * @param string[] $wpsmiliestrans List of the smilies' hexadecimal representations, keyed by their smily code.
4886  	 */
4887  	$wpsmiliestrans = apply_filters( 'smilies', $wpsmiliestrans );
4888  
4889  	if ( count( $wpsmiliestrans ) === 0 ) {
4890  		return;
4891  	}
4892  

PHP Documentation

<?php
/**
	 * Filters all the smilies.
	 *
	 * This filter must be added before `smilies_init` is run, as
	 * it is normally only run once to setup the smilies regex.
	 *
	 * @since 4.7.0
	 *
	 * @param string[] $wpsmiliestrans List of the smilies' hexadecimal representations, keyed by their smily code.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/functions.php
Related Hooks

Related hooks will be displayed here in future updates.