Changeset 56682 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 09/25/2023 05:04:41 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/formatting.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r56596 r56682 5859 5859 5860 5860 /** 5861 * Prints the important emoji-related styles.5862 * 5863 * @since 4.2.05864 */ 5865 function print_emoji_styles() {5866 static $printed = false;5867 5868 if ( $printed) {5861 * Enqueues the important emoji-related styles. 5862 * 5863 * @since 6.4.0 5864 */ 5865 function wp_enqueue_emoji_styles() { 5866 // Back-compat for plugins that disable functionality by unhooking this action. 5867 $action = is_admin() ? 'admin_print_styles' : 'wp_print_styles'; 5868 if ( ! has_action( $action, 'print_emoji_styles' ) ) { 5869 5869 return; 5870 5870 } 5871 5872 $printed = true; 5873 5874 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; 5875 ?> 5876 <style<?php echo $type_attr; ?>> 5877 img.wp-smiley, 5878 img.emoji { 5879 display: inline !important; 5880 border: none !important; 5881 box-shadow: none !important; 5882 height: 1em !important; 5883 width: 1em !important; 5884 margin: 0 0.07em !important; 5885 vertical-align: -0.1em !important; 5886 background: none !important; 5887 padding: 0 !important; 5888 } 5889 </style> 5890 <?php 5871 remove_action( $action, 'print_emoji_styles' ); 5872 5873 $emoji_styles = ' 5874 img.wp-smiley, img.emoji { 5875 display: inline !important; 5876 border: none !important; 5877 box-shadow: none !important; 5878 height: 1em !important; 5879 width: 1em !important; 5880 margin: 0 0.07em !important; 5881 vertical-align: -0.1em !important; 5882 background: none !important; 5883 padding: 0 !important; 5884 }'; 5885 $handle = 'wp-emoji-styles'; 5886 wp_register_style( $handle, false ); 5887 wp_add_inline_style( $handle, $emoji_styles ); 5888 wp_enqueue_style( $handle ); 5891 5889 } 5892 5890
Note: See TracChangeset
for help on using the changeset viewer.