| Server IP : 87.229.120.60 / Your IP : 216.73.216.245 Web Server : Apache System : Linux outside 5.4.8_Algonet_ZeroMAC_0.9.4.8 #6 SMP Mon Feb 3 20:36:07 CET 2020 x86_64 User : server ( 1002) PHP Version : 8.3.20 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/faktorteam/www/wp-content/plugins/wp-rocket/inc/3rd-party/plugins/ |
Upload File : |
<?php
/**
* Compatibility with SumoMe
*
* Prevents conflict with SumoMe and the WP Rocket UI by removing SumoMe
* styles and scripts on WP Rocket admin pages.
*
* @link https://wordpress.org/plugins/sumome/
* @since 3.0.4
*/
defined( 'ABSPATH' ) || exit;
if ( class_exists( 'WP_Plugin_SumoMe' ) ) {
/**
* Dequeue SumoMe styles
*
* @since 3.0.4
* @author Arun Basil Lal
*/
function rocket_dequeue_sumo_me_css() {
// Retun on all pages but WP Rocket settings page.
$screen = get_current_screen();
if ( 'settings_page_wprocket' !== $screen->id ) {
return;
}
wp_dequeue_style( 'sumome-admin-styles' );
wp_dequeue_style( 'sumome-admin-media' );
}
add_action( 'admin_enqueue_scripts', 'rocket_dequeue_sumo_me_css', PHP_INT_MAX );
/**
* Dequeue SumoMe inline script
*
* @since 3.0.4
* @author Arun Basil Lal
*/
function rocket_dequeue_sumo_me_js() {
// Retun on all pages but WP Rocket settings page.
$screen = get_current_screen();
if ( 'settings_page_wprocket' !== $screen->id ) {
return;
}
global $wp_plugin_sumome;
remove_action( 'admin_footer', [ $wp_plugin_sumome, 'append_admin_script_code' ] );
}
add_action( 'admin_head', 'rocket_dequeue_sumo_me_js' );
}