Skip to content

Instantly share code, notes, and snippets.

@palmiak
Created April 16, 2020 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palmiak/93d6cdf989be0037b76c8b7efeb2e665 to your computer and use it in GitHub Desktop.
Save palmiak/93d6cdf989be0037b76c8b7efeb2e665 to your computer and use it in GitHub Desktop.
<?php
add_action( 'current_screen', 'wpdocs_this_screen' );
function wpdocs_this_screen() {
$current_screen = get_current_screen();
if ( strpos( $current_screen->id, 'forminator' ) !== false ) {
$scripts = array(
'wpdm-gb-util',
'wpdm-link-templates',
'wpdm-package-selector',
'wpdm-category-selector',
'wpdm-category-dropdown',
'wpdm-icons',
'wpdmgb-sidebar',
);
foreach ( $scripts as $script ) {
wp_deregister_script( $script );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment