My parent theme removes the emoji fallback script that makes emoji show up as images:
// parent theme's functions.php
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
I want to add it back in the child theme (to make this configuration survive theme updates) but if I just add_action
it either doesn't work at all or works for the wp-emoji.js
script but not for the CSS styles (print_emoji_styles
) – emojis appear enormous, SVG spreads to all the available space.
If I disable the two lines in the parent theme everything works as expected.
What is going on, what should I look for to figure out the correct orchestration here?
My parent theme removes the emoji fallback script that makes emoji show up as images:
// parent theme's functions.php
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
I want to add it back in the child theme (to make this configuration survive theme updates) but if I just add_action
it either doesn't work at all or works for the wp-emoji.js
script but not for the CSS styles (print_emoji_styles
) – emojis appear enormous, SVG spreads to all the available space.
If I disable the two lines in the parent theme everything works as expected.
What is going on, what should I look for to figure out the correct orchestration here?
Share Improve this question edited Dec 18, 2019 at 19:48 Leeroy asked Dec 18, 2019 at 19:21 LeeroyLeeroy 1113 bronze badges1 Answer
Reset to default 1Choosing a higher priority for both the script AND the styles seems to work:
add_action('wp_head', 'print_emoji_detection_script', 8);
add_action('wp_print_styles', 'print_emoji_styles', 8);