wp-includes/fonts/class-wp-font-face.php:73Generates and prints the @font-face styles for the given fonts.
$fontsarray[][] public function generate_and_print( array $fonts ) { $fonts = $this->validate_fonts( $fonts ); // Bail out if there are no fonts are given to process. if ( empty( $fonts ) ) { return; } $css = $this->get_css( $fonts ); /* * The font-face CSS is contained within <style> tags and can only be interpreted * as CSS in the browser. Using wp_strip_all_tags() is sufficient escaping * to avoid malicious attempts to close </style> and open a <script>. */ $css = wp_strip_all_tags( $css ); // Bail out if there is no CSS to print. if ( empty( $css ) ) { return; } $processor = new WP_HTML_Tag_Processor( '<style class="wp-fonts-local"></style>' ); $processor->next_tag(); $processor->set_modifiable_text( "\n{$css}\n" ); echo "{$processor->get_updated_html()}\n"; }Introduced in 6.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/fonts/class-wp-font-face.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.