Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 504799

Admin Scripts & Styles break WP Webhooks

$
0
0

Replies: 0

The admin styles of this plugin break the layout of the plugin WP Webhooks. It is available for free on WordPress.org, so feel free to just try it yourself in combination with your plugin.

To make it work, I added the following code to my functions.php file, but I would like to have this fixed within your plugin to either address the classes correctly or to not load the styles on pages that don’t need them.

function pu_dequeue_script(){

	if( ! isset( $_GET['page'] ) || $_GET['page'] !== 'wp-webhooks-pro' ){
		return;
	}

	// Run the dequeue script with the handle of the JavaScript file
	wp_dequeue_script( 'mo_customer_validation_admin_settings_script' );
	wp_dequeue_script( 'mo_customer_validation_form_validation_script' );
	wp_dequeue_script( 'mo_customer_validation_inttelinput_script' );

	// Run the dequeue style with the handle of the CSS file
	wp_dequeue_style( 'mo_customer_validation_admin_settings_style' );
	wp_dequeue_style( 'mo_customer_validation_inttelinput_style' );
}
add_action( 'admin_enqueue_scripts', 'pu_dequeue_style', 100 );

Viewing all articles
Browse latest Browse all 504799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>