/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 1.0.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/*
    Add your custom styles here
*/

/**
 * Disable Comments
 */
add_filter( 'comments_open', '__return_false', 10, 2 );

/**
 * Disable Emojis
 */
function remove_emoji() {
  remove_action("wp_head", "print_emoji_detection_script", 7);
  remove_action("admin_print_scripts", "print_emoji_detection_script");
  remove_action("admin_print_styles", "print_emoji_styles");
  remove_action("wp_print_styles", "print_emoji_styles");
  remove_filter("the_content_feed", "wp_staticize_emoji");
  remove_filter("comment_text_rss", "wp_staticize_emoji");
  remove_filter("wp_mail", "wp_staticize_emoji_for_email");
  add_filter("tiny_mce_plugins", "remove_tinymce_emoji");
}
add_action("init", "remove_emoji");
function remove_tinymce_emoji($plugins) {
  if (!is_array($plugins)) {
    return array();
  }
  return array_diff($plugins, array("wpemoji"));
}
