diff --git a/css/admin_notices.css b/css/admin_notices.css index 20d367b..9977137 100644 --- a/css/admin_notices.css +++ b/css/admin_notices.css @@ -16,6 +16,7 @@ #meta-link-notices-wrap > button.notice-dismiss { position: relative; display: flex; + width: 100%; } .notice_container{ diff --git a/js/notice_manager_panel.js b/js/notice_manager_panel.js index 166f6e9..0a6e498 100644 --- a/js/notice_manager_panel.js +++ b/js/notice_manager_panel.js @@ -131,9 +131,7 @@ var NoticeManager = (function ($, document) { */ collectNotices: () => { notices.appendTo(".notice_container").eq(0); - $(".notice_container").removeClass("empty"); - - if (dismissNoticesButton.length) dismissNoticesButton.detach(); + $(".notice_container").removeClass("empty"); // .empty removes padding /** * When dismissible notices are dismissed, check if any notices are left on page. diff --git a/src/NoticeManager.php b/src/NoticeManager.php index 2a604a5..7a03d0c 100644 --- a/src/NoticeManager.php +++ b/src/NoticeManager.php @@ -69,14 +69,15 @@ class NoticeManager{ /* not JSON-safe - unescaped quotes */ function print_notice_manager_panel(){ + // if auto_collect is ON - we don't need the button. + // if ( empty( $this->options['auto_collect'] ) ) + // We ALWAYS print the button! + echo '
' ; + // NOTE: // button is a copy of is-dismissible button - for styling purposes only // js functionality and listener - js/notice_manager_meta_panel.js echo ''; - - // if auto_collect is ON - we don't need the button. - if ( empty( $this->options['auto_collect'] ) ) - echo '' ; } } \ No newline at end of file