跳到内容

Huntsman Dark Mode Site Icon

v1.0.2

Josh Hunt · 2026年1月14日 上架

Set separate site icons for light and dark mode based on the visitor’s system theme.

正在使用
10+
评分
暂无
累计下载
882
最近更新
2026年10月22日
需要 WordPress 6.0+已测试到 7.1.5PHP 7.4+

贡献者

截图

Visual overview showing how separate site icons are used in light and dark mode.
Visual overview showing how separate site icons are used in light and dark mode.
Graphical representation illustrating how the Dark Mode Site Icon is applied across the frontend, admin area, and Site Editor.
Graphical representation illustrating how the Dark Mode Site Icon is applied across the frontend, admin area, and Site Editor.
Example showing improved favicon visibility in light and dark mode, along with supported icon formats.
Example showing improved favicon visibility in light and dark mode, along with supported icon formats.
Actual Dark Mode Site Icon settings screen in the WordPress admin, where the dark mode icon is uploaded and managed.
Actual Dark Mode Site Icon settings screen in the WordPress admin, where the dark mode icon is uploaded and managed.

Huntsman Dark Mode Site Icon allows you to set a separate site icon for light and dark mode.

Upload one icon for light mode using WordPress’s built-in Site Icon, and upload a separate icon for dark mode using this plugin. The appropriate icon is then displayed automatically based on the visitor’s system theme.

No code or configuration is required. If no dark mode icon is set, WordPress behaves exactly as normal.

Key Features

  • Separate site icons for light mode and dark mode
  • Simple upload interface in the WordPress admin
  • Works on the frontend, admin area, and login screen
  • Optional enable/disable toggle
  • Does not replace or override the core WordPress Site Icon
  • Accessable via the WP API

Usage

  • Site Icon (WordPress)
    This is the default WordPress Site Icon and is still managed by WordPress.

  • Dark Mode Site Icon
    This icon is only used when the user’s system is in dark mode and the browser supports prefers-color-scheme.

If the Dark Mode Site Icon is not set, the plugin does nothing and WordPress behaves normally.

REST API

The plugin exposes a public REST endpoint for accessing the Dark Mode Site Icon:

/wp-json/hdmsi/v1/icons

Example response:
{
“enabled”: true,
“dark”: {
“id”: 123,
“url”: “https://example.com/icon-dark.png”
}
}
A dark-mode Web App Manifest is also available at:

/wp-json/hdmsi/v1/manifest?mode=dark

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums