我的标题 wordpress 之前的奇怪文字

Ale*_*ame 4 wordpress text header

我昨天更新了新的 wordpress 版本,从那以后,我的网站顶部有这个奇怪的文本,就在标题上方,工具栏应该在那里。

window._wpemojiSettings = {
   "baseUrl": "http:\/\/s.w.org\/images\/core\/emoji\/72x72\/",
   "ext": ".png",
   "source": {
     "concatemoji": "http:\/\/localhost\/wordpress\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.2.1"
   }
 };
 ! function(a, b, c) {
   function d(a) {
     var c = b.createElement("canvas"),
       d = c.getContext && c.getContext("2d");
     return d && d.fillText ? (d.textBaseline = "top", d.font = "600 32px Arial", "flag" === a ? (d.fillText(String.fromCharCode(55356, 56812, 55356, 56807), 0, 0), c.toDataURL().length > 3e3) : (d.fillText(String.fromCharCode(55357, 56835), 0, 0), 0 !== d.getImageData(16, 16, 1, 1).data[0])) : !1
   }

   function e(a) {
     var c = b.createElement("script");
     c.src = a, c.type = "text/javascript", b.getElementsByTagName("head")[0].appendChild(c)
   }
   var f;
   c.supports = {
     simple: d("simple"),
     flag: d("flag")
   }, c.supports.simple && c.supports.flag || (f = c.source || {}, f.concatemoji ? e(f.concatemoji) : f.wpemoji && f.twemoji && (e(f.twemoji), e(f.wpemoji)))
 }(window, document, window._wpemojiSettings);
Run Code Online (Sandbox Code Playgroud)

有人有线索吗?

Gai*_*aia 7

我们将挂钩init和删除操作如下:

function disable_wp_emojicons() {

  // all actions related to emojis
  remove_action( 'admin_print_styles', 'print_emoji_styles' );
  remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
  remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
  remove_action( 'wp_print_styles', 'print_emoji_styles' );
  remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
  remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
  remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );

  // filter to remove TinyMCE emojis
  add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' );
}
add_action( 'init', 'disable_wp_emojicons' );
Run Code Online (Sandbox Code Playgroud)

我们将需要以下过滤器功能来禁用 TinyMCE 表情符号:

function disable_emojicons_tinymce( $plugins ) {
  if ( is_array( $plugins ) ) {
    return array_diff( $plugins, array( 'wpemoji' ) );
  } else {
    return array();
  }
}
Run Code Online (Sandbox Code Playgroud)

现在我们喘口气并假装这个功能从未被添加到核心......特别是当大量已解决的错误尚未实现时。

这可用作插件Disable Emojis

或者,您可以使用Classic Smilies将表情符号替换为先前版本的 WordPress 的原始版本。

PS:我试图将此问题标记为185577的副本