How to Solve 3rd-party CSS Menu Conflict

MailPoet has a no-conflict system preventing other scripts and styles from breaking our admin pages, so we currently block the loading of 3rd-party plugin assets on MailPoet admin pages.

As I consequence, you may see some 3rd-party plugin icon image way bigger in the WordPress dashboard sidebar menu when on navigating through the MailPoet admin pages:

As a workaround, we have two filters that can be used to whitelist scripts and styles, but you'll need to find out the domain of your theme or plugin to allow them to work on MailPoet admin pages.

These filters should be added to the website's  functions.php:

For scripts:

add_filter('mailpoet_conflict_resolver_whitelist_script', function ($scripts) {
  $scripts[] = 'modern-events-calendar-lite'; // plugin name to whitelist
  return $scripts;
});

For styles:

add_filter('mailpoet_conflict_resolver_whitelist_style', function ($whitelistedStyles) {
  $whitelistedStyles[] = 'modern-events-calendar-lite'; // plugin name to whitelist
  return $whitelistedStyles;
});

Please change “ modern-events-calendar-lite” with the plugin name.

Note that apart from this issue, the no-conflict system may also prevent extra functionalities added by 3rd-party plugins (e.g. dropdown menus, custom JS logic, etc) from being loaded and they may not work properly when on the MailPoet admin pages.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.