Created
May 22, 2019 05:04
-
-
Save wpmudev-sls/ea8f4d5de67533c212ffc01d3b8579a4 to your computer and use it in GitHub Desktop.
[Appointments +] Fix conflict with multiple select of M2P v1.5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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