A Log in/out block placed inside a Navigation block and given a CSS class starting icon- (for example icon-user) gets an inline SVG icon before its link text: a user icon when logged out and a log-out icon when logged in. The block’s wrapper gets the has-inline-icon class, so a theme can skip its own pseudo-element icon, as LH 2015 does in its social menu.
Left untouched: Log in/out blocks without an icon- class (plain text links in a footer menu, say), blocks outside a Navigation block, and blocks set to show the login form.
render_block_data in, render_block_core/navigation out), so the Log in/out filter knows whether it is inside one.lh-membership-loginout-icon, is aria-hidden, 1em square and drawn in currentColor. A one-line style giving it a small end margin is enqueued only on pages that draw it.icon- class inside Navigation blocks.lh_membership_return_loginout_icons ( array $icons ): the icons, keyed login and logout, each an array of viewbox and path.lh_membership_loginout_show_icon ( bool $show, array $block ): whether this block gets the icon.The code is includes/lh-membership-loginout-icon-class.php. (Since 2.108.0; limited to blocks with an icon- class since 2.108.1.)