FOUC - add body class .notices-above-title
Do not display notices before they are moved to new position.
This commit is contained in:
parent
a2c3e60f87
commit
2362cb37df
@ -33,4 +33,12 @@
|
||||
.notice_container > div.notice,
|
||||
.notice_container > div.update-nag{
|
||||
margin: 5px 12px 15px 12px !important; /* Override plugins custom css */
|
||||
}
|
||||
|
||||
/* This should only be used if auto-collect/above-title is enabled */
|
||||
.notices-above-title .wrap > div.updated,
|
||||
.notices-above-title .wrap > div.error,
|
||||
.notices-above-title .wrap > div.notice,
|
||||
.notices-above-title .wrap > div.update-nag{
|
||||
display: none;
|
||||
}
|
||||
@ -35,6 +35,10 @@ class NoticeManager{
|
||||
// array_walk($this->options,function(&$item){$item=0;});
|
||||
}
|
||||
|
||||
if ( ! empty( $this->options['above_title'] ) ){
|
||||
add_filter( 'admin_body_class', fn($classes) => $classes . ' notices-above-title' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function admin_enqueues(){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user