Advertisement
fauzanjeg

Fix Conflict with WPForms plugin

Sep 28th, 2021
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. /** Fix Conflict with WPForms plugin */
  2. function fix_conflict_with_wp_forms_plugin() {
  3.     if ( isset( $_GET['page'] ) ) {
  4.         $page =  $_GET['page'];
  5.         $page = explode( '-', $page );
  6.         if ( 'wpforms' === $page[0] ) { /* If WPForms plugin Page */
  7.             remove_action( 'admin_enqueue_scripts', array( JNews\Asset\BackendAsset::getInstance(), 'backend_script' ), 99 );
  8.         }
  9.     }
  10. }
  11.  
  12. add_action( 'wp_loaded', 'fix_conflict_with_wp_forms_plugin' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement