Add emoji support to newsletter body [MAILPOET-1009]

This commit is contained in:
stoletniy
2017-08-28 19:07:17 +03:00
parent 544bf0ddfd
commit b9bdc86fd9
6 changed files with 169 additions and 2 deletions

View File

@@ -48,6 +48,11 @@ class Menu {
if(self::isOnMailPoetAdminPage()) {
do_action('mailpoet_conflict_resolver_styles');
do_action('mailpoet_conflict_resolver_scripts');
if($_REQUEST['page'] === 'mailpoet-newsletter-editor') {
// Disable WP emojis to not interfere with the newsletter editor emoji handling
$this->disableWPEmojis();
}
}
$main_page_slug = 'mailpoet-newsletters';
@@ -278,6 +283,11 @@ class Menu {
);
}
function disableWPEmojis() {
remove_action('admin_print_scripts', 'print_emoji_detection_script');
remove_action('admin_print_styles', 'print_emoji_styles');
}
function welcome() {
if((bool)(defined('DOING_AJAX') && DOING_AJAX)) return;