Created
December 22, 2019 15:42
-
-
Save cryptexvinci/24d9ca52777fda3f482d086dd9568424 to your computer and use it in GitHub Desktop.
Remove all CSS & JS of Ultimate Member
This file contains hidden or 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
add_action( 'wp_enqueue_scripts', 'core_functionality_dequeue_UM_styles', 1000 ); | |
/** | |
* Remove all 21 CSS files of UM | |
* Remove all 21 JS files of UM | |
* | |
*/ | |
function core_functionality_dequeue_UM_styles(){ | |
if ( class_exists( 'UM' ) ) return; | |
// UM CSS Array | |
$um_css = array( | |
'um_default_css', | |
'um_responsive', | |
'um_styles', | |
'select2', | |
'um_profile', | |
'um_account', | |
'um_members', | |
'um_tipsy', | |
'um_datetime_time', | |
'um_datetime_date', | |
'um_datetime', | |
'um_scrollbar', | |
'um_fileupload', | |
'um_fonticons_fa', | |
'um_fonticons_ii', | |
'um_raty', | |
'um_crop', | |
'um_modal', | |
'um_misc', | |
'um_old_default_css', | |
'um_old_css', | |
); | |
foreach ( $um_css as $css ) : | |
wp_dequeue_style( $css ); | |
endforeach; | |
// UM JS Array | |
$um_js = array( | |
'um_datetime_locale', | |
'um_gchart', | |
'select2', | |
'um_jquery_form', | |
'um_fileupload', | |
'um_functions', | |
'um-gdpr', | |
'um_conditional', | |
'um_scripts', | |
'um_members', | |
'um_profile', | |
'um_account', | |
'um_datetime', | |
'um_datetime_date', | |
'um_datetime_time', | |
'um_datetime_legacy', | |
'um_scrollbar', | |
'um_raty', | |
'um_crop', | |
'um_tipsy', | |
'um_modal', | |
'um_responsive', | |
); | |
foreach ( $um_js as $js ) : | |
wp_dequeue_script( $js ); | |
endforeach; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment