The rise of the emojis!

Solved4.91K viewsIssues
2

Emojis are quietly invading AnsPress and ready to pounce whenever you click Edit Question or Edit Answer ?

Steps to reproduce:

  1. Type an emoji ? into a question or an answer.
  2. Click Post question or Post answer
  3. Go back to that question or answer
  4. Click … > Edit
  5. Huge emojis!! ? ? 🙂

Workaround:

  1. Copy /wp-content/plugins/anspress-question-answer/templates/css/editor.css to /wp-content/themes/<your_child_theme>/anspress/css/editor.css
  2. Add .emoji { width: 1em; } into that CSS file
  3. 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

Question is closed for new answers.
selected answer
1

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.

commented on answer

Sent a pull request on GitHub!

2

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.

commented on answer

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