Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. window._wpemojiSettings = {
  2. "baseUrl": "http://s.w.org/images/core/emoji/72x72/",
  3. "ext": ".png",
  4. "source": {
  5. "concatemoji": "http://localhost/wordpress/wp-includes/js/wp-emoji-release.min.js?ver=4.2.1"
  6. }
  7. };
  8. ! function(a, b, c) {
  9. function d(a) {
  10. var c = b.createElement("canvas"),
  11. d = c.getContext && c.getContext("2d");
  12. 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
  13. }
  14.  
  15. function e(a) {
  16. var c = b.createElement("script");
  17. c.src = a, c.type = "text/javascript", b.getElementsByTagName("head")[0].appendChild(c)
  18. }
  19. var f;
  20. c.supports = {
  21. simple: d("simple"),
  22. flag: d("flag")
  23. }, c.supports.simple && c.supports.flag || (f = c.source || {}, f.concatemoji ? e(f.concatemoji) : f.wpemoji && f.twemoji && (e(f.twemoji), e(f.wpemoji)))
  24. }(window, document, window._wpemojiSettings);
  25.  
  26. function disable_wp_emojicons() {
  27.  
  28. // all actions related to emojis
  29. remove_action( 'admin_print_styles', 'print_emoji_styles' );
  30. remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
  31. remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
  32. remove_action( 'wp_print_styles', 'print_emoji_styles' );
  33. remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
  34. remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
  35. remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
  36.  
  37. // filter to remove TinyMCE emojis
  38. add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' );
  39. }
  40. add_action( 'init', 'disable_wp_emojicons' );
  41.  
  42. function disable_emojicons_tinymce( $plugins ) {
  43. if ( is_array( $plugins ) ) {
  44. return array_diff( $plugins, array( 'wpemoji' ) );
  45. } else {
  46. return array();
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement