8 – Disable "Operand in maintenance mode. Go online".

The solution for Drupal 7 is to use the following code, according to the answer of How can I disable the message "Operating in maintenance mode? Go online "in maintenance mode?

function mytheme_preprocess_page (& $ vars) {
if (variable_get (& # 39; maintenance_mode & # 39 ;, 0)) {
$ message_count = count ($ _ SESSION['messages']['status']);
if ($ message_count> 1) {
array_shift ($ _ SESSION['messages']['status']);
}
else {
unset ($ _ SESSION['messages']['status']);
}
}
}

What is the solution for Drupal 8?

I can not figure out how to do it with https://www.drupal.org/project/disable_messages.

Hides / disables the message for everyone, including user # 1.

"Where do I start when I want to earn money online?"

It is likely that many people find themselves asking this exact question … and it can be difficult to answer it.

There are many ways to earn money online, but which one will work best for you as an entrepreneur?

It should be something that increases your interests, but that is also profitable.

What advice do my fellow DPers have? I recently published an article talking a little about that, but it is not extensive.
SEMrush

Cheers!

"Opportunity to earn easy and reliable online"

Receive a payment to PROMOTE your own PTP link
Receive payments to SURF our ads
Receive money to REFER your friends
Receive the payment through PayPal, Payza or Bitcoin
There are no limits on the amounts of income or references
Detailed monitoring of user activity
Weekly activities contests.
Fast payments on time, all the time
Fast and professional support.

My Web page