SiteIcon final readonly class
Minn\Content\SiteIcon · public/minn/src/Minn/Content/SiteIcon.php · 63 lines
The site icon: the attachment the site_icon option names, as the file under uploads it points at. Read by the favicon route, the head links, and the admin app's sidebar.
Constants and properties
| private | readonly Minn\Content\Site $site | Promoted from the constructor. |
| private | readonly Minn\Content\Posts $posts | Promoted from the constructor. |
| private | readonly Minn\Front\Permalinks $permalinks | Promoted from the constructor. |
Public
| new | __construct(Minn\Content\Site $site, Minn\Content\Posts $posts, Minn\Front\Permalinks $permalinks)# | |
| method | file(): ?string# | The icon's path under uploads, or null when the site has none. |
| method | urlAt(int $size): string# | The URL of the icon's smallest generated size that covers a square of $size pixels, or of the original when no size does; empty without an icon. |
| method | url(): string# | The icon's URL, empty when the site has none. |
| method | links(): string# | The head links a site with an icon prints (wp_site_icon): the 32 and 192 pixel icons, the Apple touch icon, and the tile image; empty without one. |
Nothing matches.