Changeset 31875 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 03/24/2015 11:32:23 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r31864 r31875 4083 4083 */ 4084 4084 function print_emoji_styles() { 4085 static $printed = false; 4086 4087 if ( $printed ) { 4088 return; 4089 } 4090 4091 $printed = true; 4085 4092 ?> 4086 4093 <style type="text/css"> … … 4099 4106 </style> 4100 4107 <?php 4108 } 4109 4110 function print_emoji_detection_script() { 4111 global $wp_version; 4112 static $printed = false; 4113 4114 if ( $printed ) { 4115 return; 4116 } 4117 4118 $printed = true; 4119 4120 $settings = array( 4121 /** 4122 * Filter the URL where emoji images are hosted. 4123 * 4124 * @since 4.2.0 4125 * 4126 * @param string The emoji base URL. 4127 */ 4128 'baseUrl' => apply_filters( 'emoji_url', set_url_scheme( '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72' ) ), 4129 4130 /** 4131 * Filter the extension of the emoji files. 4132 * 4133 * @since 4.2.0 4134 * 4135 * @param string The emoji extension. Default .png. 4136 */ 4137 'ext' => apply_filters( 'emoji_ext', '.png' ), 4138 ); 4139 4140 $version = 'ver=' . $wp_version; 4141 4142 if ( SCRIPT_DEBUG ) { 4143 $settings['source'] = array( 4144 'wpemoji' => includes_url( "js/wp-emoji.js?$version" ), 4145 'twemoji' => includes_url( "js/twemoji.js?$version" ), 4146 ); 4147 4148 ?> 4149 <script type="text/javascript"> 4150 window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>; 4151 <?php readfile( ABSPATH . WPINC . "/js/wp-emoji-loader.js" ); ?> 4152 </script> 4153 <?php 4154 } else { 4155 $settings['source'] = array( 4156 'concatemoji' => includes_url( "js/wp-emoji-release.min.js?$version" ), 4157 ); 4158 4159 ?> 4160 <script type="text/javascript"> 4161 window._wpemojiSettings = <?php echo wp_json_encode( $settings ); ?>; 4162 include "js/wp-emoji-loader.min.js" 4163 </script> 4164 <?php 4165 } 4101 4166 } 4102 4167 … … 4164 4229 } 4165 4230 4166 /** This filter is documented in wp-includes/ script-loader.php */4231 /** This filter is documented in wp-includes/formatting.php */ 4167 4232 $cdn_url = apply_filters( 'emoji_url', set_url_scheme( '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72/' ) ); 4168 4233 4169 /** This filter is documented in wp-includes/ script-loader.php */4234 /** This filter is documented in wp-includes/formatting.php */ 4170 4235 $ext = apply_filters( 'emoji_ext', '.png' ); 4171 4236
Note: See TracChangeset
for help on using the changeset viewer.