Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save RafaelFunchal/3de01bebce157507e43d to your computer and use it in GitHub Desktop.
Save RafaelFunchal/3de01bebce157507e43d to your computer and use it in GitHub Desktop.
If your theme or plugin is inserting files in MailPoet pages and it is breaking some functions, you should apply this conditional to load your files
<?php
/**
* If your theme or plugin is inserting files in MailPoet pages
* and it is breaking some functions, you should apply this
* conditional to load your files.
*
* Normally themes use these functions wp_enqueue_style() and wp_enqueue_script()
*/
if ( ( isset($_GET['page']) && $_GET['page'] != 'wysija_campaigns' ) && ( isset($_GET['page']) && $_GET['page'] != 'wysija_subscribers' ) && ( isset($_GET['page']) && $_GET['page'] != 'wysija_statistics' ) && ( isset($_GET['page']) && $_GET['page'] != 'wysija_config' ) ) {
// Put your enqueue styles and scripts here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment