Title: wp_enqueue_emoji_styles
Published: November 8, 2023
Last modified: May 20, 2026

---

# wp_enqueue_emoji_styles()

## In this article

 * [Source](https://developer.wordpress.org/reference/functions/wp_enqueue_emoji_styles/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_enqueue_emoji_styles/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_enqueue_emoji_styles/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_enqueue_emoji_styles/?output_format=md#wp--skip-link--target)

Enqueues the important emoji-related styles.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_enqueue_emoji_styles/?output_format=md#source)󠁿

    ```php
    function wp_enqueue_emoji_styles() {
    	// Back-compat for plugins that disable functionality by unhooking this action.
    	$action = is_admin() ? 'admin_print_styles' : 'wp_print_styles';
    	if ( ! has_action( $action, 'print_emoji_styles' ) ) {
    		return;
    	}
    	remove_action( $action, 'print_emoji_styles' );

    	$emoji_styles = '
    	img.wp-smiley, img.emoji {
    		display: inline !important;
    		border: none !important;
    		box-shadow: none !important;
    		height: 1em !important;
    		width: 1em !important;
    		margin: 0 0.07em !important;
    		vertical-align: -0.1em !important;
    		background: none !important;
    		padding: 0 !important;
    	}';
    	$handle       = 'wp-emoji-styles';
    	wp_register_style( $handle, false );
    	wp_add_inline_style( $handle, $emoji_styles );
    	wp_enqueue_style( $handle );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/formatting.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/formatting.php#L5870)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/formatting.php#L5870-L5894)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_enqueue_emoji_styles/?output_format=md#related)󠁿

| Uses | Description | 
| [wp_register_style()](https://developer.wordpress.org/reference/functions/wp_register_style/)`wp-includes/functions.wp-styles.php` |

Registers a CSS stylesheet.

  | 
| [wp_add_inline_style()](https://developer.wordpress.org/reference/functions/wp_add_inline_style/)`wp-includes/functions.wp-styles.php` |

Adds extra CSS styles to a registered stylesheet.

  | 
| [has_action()](https://developer.wordpress.org/reference/functions/has_action/)`wp-includes/plugin.php` |

Checks if any action has been registered for a hook.

  | 
| [remove_action()](https://developer.wordpress.org/reference/functions/remove_action/)`wp-includes/plugin.php` |

Removes a callback function from an action hook.

  | 
| [is_admin()](https://developer.wordpress.org/reference/functions/is_admin/)`wp-includes/load.php` |

Determines whether the current request is for an administrative interface page.

  | 
| [wp_enqueue_style()](https://developer.wordpress.org/reference/functions/wp_enqueue_style/)`wp-includes/functions.wp-styles.php` |

Enqueues a CSS stylesheet.

  |

[Show 2 more](https://developer.wordpress.org/reference/functions/wp_enqueue_emoji_styles/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_enqueue_emoji_styles/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_enqueue_emoji_styles/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.4.0](https://developer.wordpress.org/reference/since/6.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_enqueue_emoji_styles%2F)
before being able to contribute a note or feedback.