emoji_url
云策文档标注
概述
emoji_url 是一个 WordPress 过滤器,用于修改 emoji PNG 图片的托管 URL。它允许开发者自定义 emoji 图片的基础路径,常用于优化加载或替换默认资源。
关键要点
- 过滤器名称:emoji_url
- 参数:$url(字符串类型),表示 emoji PNG 图片的基础 URL
- 默认值:https://s.w.org/images/core/emoji/17.0.2/72x72/
- 引入版本:WordPress 4.2.0
- 相关函数:wp_staticize_emoji() 用于将 emoji 转换为静态 img 元素
代码示例
'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/17.0.2/72x72/' ),
原文内容
Filters the URL where emoji png images are hosted.
Parameters
$urlstring-
The emoji base URL for png images.
Source
'baseUrl' => apply_filters( 'emoji_url', 'https://s.w.org/images/core/emoji/17.0.2/72x72/' ),
Changelog
| Version | Description |
|---|---|
| 4.2.0 | Introduced. |