The rise of the emojis!
Emojis are quietly invading AnsPress and ready to pounce whenever you click Edit Question or Edit Answer ?
Steps to reproduce:
- Type an emoji ? into a question or an answer.
- Click Post question or Post answer
- Go back to that question or answer
- Click … > Edit
- Huge emojis!! ? ? 🙂
Workaround:
- Copy /wp-content/plugins/anspress-question-answer/templates/css/editor.css to /wp-content/themes/<your_child_theme>/anspress/css/editor.css
- Add .emoji { width: 1em; } into that CSS file
- If it’s still not working, you need to increment the version of your editor.css file. Add into /wp-content/themes/<your_child_theme>/functions.php:
add_filter( ‘ap_theme_url’, ‘ap_my_editor_css_url’ );
function ap_my_editor_css_url( $template_url ) {
$editor_css_url = get_stylesheet_directory_uri() . ‘/anspress/css/editor.css’;
if( strpos( $template_url, $editor_css_url ) !== false ) {
return $editor_css_url . ‘?v=0.1’;
}
else {
return $template_url;
}
}
Thanks,
@awijasa
Hello @awijasa,
Thanks for letting us know and providing a solution. You can send a pull request to our GitHub repo. Edit our editor.css file and send pull request, I will merge it.
Thanks
Hi awijasa
I tried and do what you are wrote but if i edit the functions.php the site die ahah
I saw that it’s enough the point 1 and 2.
Hello @morissio, You are on point. I edited my question above so that anyone who wants to try the workaround will do step 1 and 2 first. Thanks, @awijasa
Sent a pull request on GitHub!