BlockWidget final class
Minn\Runtime\BlockWidget · public/minn/src/Minn/Runtime/BlockWidget.php · 30 lines
A block widget's legacy class name. Every widget the block editor saves is one block of markup, and a classic theme styles it by the widget class the equivalent legacy widget used, so the wrapper carries a second class named after the FIRST block in the content. A block with no legacy equivalent adds nothing.
Constants and properties
| const | BASE_CLASS = 'widget_block' | |
| private | LEGACY_CLASSES = array ( 'core/paragraph' => 'widget_text', 'core/search' => 'widget_search', 'core/html' => 'widget_custom_html', 'core/archives' => 'widget_archive', 'core/latest-posts' => 'widget_recent_entries', 'core/latest-comments' => 'widget_recent_comments', 'core/tag-cloud' => 'widget_tag_cloud', 'core/categories' => 'widget_categories', 'core/calendar' => 'widget_calendar', 'core/rss' => 'widget_rss', ) | First block name => the legacy widget class a theme styles. |
Public
| static | classNameFor(array $blocks): string# | The legacy widget class a block widget maps to.
|
Nothing matches.