Log in/out icon

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.

How it works

Filters

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.)