Title: WP_Font_Face::get_style_element
Published: November 8, 2023
Last modified: February 24, 2026

---

# WP_Font_Face::get_style_element(): string

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wp_font_face/get_style_element/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_font_face/get_style_element/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_font_face/get_style_element/?output_format=md#changelog)

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

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Gets the style element for wrapping the `@font-face` CSS.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_font_face/get_style_element/?output_format=md#return)󠁿

 string The style element.

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

    ```php
    * @since 6.4.0
    *
    * @param array $font_face Font face to process.
    * @return array Font-face with ordered src items.
    */
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/fonts/class-wp-font-face.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/fonts/class-wp-font-face.php#L229)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/fonts/class-wp-font-face.php#L229-L233)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_font_face/get_style_element/?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%2Fclasses%2Fwp_font_face%2Fget_style_element%2F)
before being able to contribute a note or feedback.