Cách ẩn 1 plugin WordPress từ danh sách Plugins trong Admin

5/5 - (3 bình chọn)

ZubiCloud hướng dẫn người dùng thiết kế website bằng wordpress, Cách ẩn 1 plugin WordPress từ danh sách Plugins trong Admin

How to Hide Specific plugin from installed plugin list

Chèn đoạn code sau vào file funtions.php trong themes.

add_filter( 'all_plugins', 'hide_plugins');
function hide_plugins($plugins)
{
// Hide hello dolly plugin
if(is_plugin_active('anbiweb-admin/custom-ad.php')) {
unset( $plugins['anbiweb-admin/custom-ad.php'] );
}
// Hide disqus plugin
if(is_plugin_active('elementor/elementor.php')) {
unset( $plugins['elementor/elementor.php'] );
}
if(is_plugin_active('elementor-pro/elementor-pro.php')) {
unset( $plugins['elementor-pro/elementor-pro.php'] );
}
return $plugins;
}
5/5 - (3 bình chọn)


Trả lời