是的,如果您将函数挂接到site_transient_update_plugins
过滤挂钩并检查插件是否使用激活is_plugin_active
像这样:
add_filter(\'site_transient_update_plugins\', \'remove_update_nag_for_deactivated\');
function remove_update_nag_for_deactivated($value) {
foreach($value->response as $key => $val){
if (!is_plugin_active($val))
unset($value->response[ $key]);
}
return $value;
}