在删除的回答中,他指出登录样式打印为wp_admin_css()
*
,我找到了一个过滤器,style_loader_tag
. 但进一步的测试表明wp_deregister_style
足够了。
反馈和进一步的测试表明,取消注册该样式会为wp-admin.css
, 所以回到loader标签:
add_action( \'login_init\', function()
{
# Produces a 404 for the style
// wp_deregister_style( \'wp-admin\' );
# The following is a filter in /wp-includes/class.wp-styles.php
# Completely cleans up the <head> of enqueues
add_filter( \'style_loader_tag\', \'__return_null\' );
});
<子>
*
这个函数中甚至有一个过滤器,但它似乎无法捕获已注册的样式