Skip to content

Instantly share code, notes, and snippets.

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 wpmudev-sls/ea8f4d5de67533c212ffc01d3b8579a4 to your computer and use it in GitHub Desktop.
Save wpmudev-sls/ea8f4d5de67533c212ffc01d3b8579a4 to your computer and use it in GitHub Desktop.
[Appointments +] Fix conflict with multiple select of M2P v1.5
<?php
/**
* Plugin Name: [Appointments +] Fix conflict with multiple select of M2P v1.5
* Description: [Appointments +] Fix conflict with multiple select of M2P v1.5 - 1118372677190215
* Author: Thobk @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
add_action( 'plugins_loaded', 'wpmudev_app_ms_fix_conflict_multiple_select_func', 100 );
function wpmudev_app_ms_fix_conflict_multiple_select_func() {
if ( defined( 'MS_PLUGIN_VERSION' ) && version_compare(MS_PLUGIN_VERSION, '1.1.6') && class_exists( 'Appointments' ) ) {
if( is_admin() ){
add_action( 'admin_print_scripts', 'wpmudev_app_ms_disabled_multiple_script' );
function wpmudev_app_ms_disabled_multiple_script(){
if( isset( $_GET['page'] ) && $_GET['page'] === 'app_settings' ){
global $wp_scripts;
if( isset( $wp_scripts->registered['ms-admin-wpmui'] ) ){
unset( $wp_scripts->registered['ms-admin-wpmui'] );
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment