Remove the site slogan from the basic site settings form if the theme doesn't use it in Drupal 8

If a theme isn’t going to be showing the site slogan, the slogan field should be removed from the basic site settings form.

… as soon as i made the commit “Hide site slogan from site managers; it’ll be edited in a block” i remembered that the slogan can also used in the title shown in the browser bar, though it isn’t by default. I remember way back in the day always using the slogan to provide part of the HTML title on the front page. But! Given that our whole goal is to make changing the front page more consistent with every other page on the site, getting the HTML title on the home page from the title of the content selected for the home page does seem the correct way to go— even if the one thing we do differently is not show the node title on the home page, but i think we can and should make all landing pages like that— if you want a title, add a title paragraph or get an h1 (level one heading) in there however you do in-content layout.

Maybe something in hook_block_alter (see BlockManager. Though i can’t see anything there or in the Block base class that looks like it would disable it from the block layout administration page.

Probably combine Some workaround to disable blocks on admin with actually disabling the block, as can be figured out from this blog post, relevant part extracted here.

But if this page gets taken over by layout builder, there’s a contrib module Layout Builder Restrictions that lets us set which blocks to hide.

Per Tim Plunkett’s comment it seems the best way to implement is with a hook_plugin_filter_TYPE_alter issues

Searched words