API / Minn\Content / SiteIcon

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

privatereadonly Minn\Content\Site $site

Promoted from the constructor.

privatereadonly Minn\Content\Posts $posts

Promoted from the constructor.

privatereadonly Minn\Front\Permalinks $permalinks

Promoted from the constructor.

Public

new__construct(Minn\Content\Site $site, Minn\Content\Posts $posts, Minn\Front\Permalinks $permalinks)#
methodfile(): ?string#

The icon's path under uploads, or null when the site has none.

methodurlAt(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.

methodurl(): string#

The icon's URL, empty when the site has none.

methodlinks(): 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.