• Resolved mpilkey

    (@mpilkey)


    Hello,
    I am in the middle of developing a website and just today I noticed a bunch of code at the top of each page of the website as follows:

    window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/72x72\/","ext":".png","source":{"concatemoji":"http:\/\/www.johnscutlery.com\/wip\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.4.2"}}; !function(a,b,c){function d(a){var c,d=b.createElement("canvas"),e=d.getContext&&d.getContext("2d"),f=String.fromCharCode;return e&&e.fillText?(e.textBaseline="top",e.font="600 32px Arial","flag"===a?(e.fillText(f(55356,56806,55356,56826),0,0),d.toDataURL().length>3e3):"diversity"===a?(e.fillText(f(55356,57221),0,0),c=e.getImageData(16,16,1,1).data.toString(),e.fillText(f(55356,57221,55356,57343),0,0),c!==e.getImageData(16,16,1,1).data.toString()):("simple"===a?e.fillText(f(55357,56835),0,0):e.fillText(f(55356,57135),0,0),0!==e.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,g;c.supports={simple:d("simple"),flag:d("flag"),unicode8:d("unicode8"),diversity:d("diversity")},c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.simple&&c.supports.flag&&c.supports.unicode8&&c.supports.diversity||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);

    I learned this was some code for emojis that WordPress was adding and found that by adding the following to my functions.php file, it removed the code:

    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_action( 'admin_print_styles', 'print_emoji_styles' );

    However, when I do this, it also completely removes the three-bar icon on my mobile navigation menu. I am using the SlickNav Menu plugin for my mobile menu. It also messes with the alignment of my navigation items on the mobile menu as well. I do not know enough code to know what needs to be done here. I honestly don’t know why this emoji code was being added at all as it was not there yesterday and I did nothing that I know of that would have caused it to be there today.
    I would appreciate any help or links that anyone may have. Oh, and I had also tried the “Disable Emojis” plugin, but that does the same thing as adding the code to my functions.php file.

Viewing 1 replies (of 1 total)
  • Thread Starter mpilkey

    (@mpilkey)

    Please disregard this post. There was an error on my part.
    I found a tag in the header that was not closed and so was causing the issue.

Viewing 1 replies (of 1 total)
  • The topic ‘Disabling emojis removes slicknav icon on mobile menu’ is closed to new replies.