js - NoticeManager.getNoticesTopPriority()
This commit is contained in:
parent
d48631c4f6
commit
eabafb460f
@ -123,6 +123,14 @@ var NoticeManager = (function ($, document) {
|
|||||||
return {
|
return {
|
||||||
getNotices: () => notices,
|
getNotices: () => notices,
|
||||||
|
|
||||||
|
getNoticesTopPriority: () => {
|
||||||
|
if ( notices.filter('.error').length )
|
||||||
|
return 'error';
|
||||||
|
if ( notices.filter('.notice-warning, .update-nag').length )
|
||||||
|
return 'warning';
|
||||||
|
return 'notice';
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collect notices into panel.
|
* Collect notices into panel.
|
||||||
* Remove dismiss-notices button.
|
* Remove dismiss-notices button.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user