跳到内容

Hugh

v1.0.4

George Stephanis · 2016年2月5日 上架

Hugh is your personal color consultant. However, Hugh also easily gives in to peer pressure.

正在使用
10 以下
评分
暂无
累计下载
1,971
最近更新
2026年6月10日
需要 WordPress 4.4+已测试到 7.0.9PHP 7.4+

Hugh is a social color experiment for WordPress. Add the Hugh widget to any sidebar and visitors to your site can pick a color — background, text, the whole page — and broadcast it to everyone else viewing the site at the same time.

How it works:

  1. A visitor opens the color picker in the Hugh widget, chooses a hex color, and optionally leaves a short note.
  2. Hugh pushes that color via the REST API and stores it (up to 100 recent entries).
  3. The page background and text color transition smoothly to the new color for all active visitors.
  4. A row of color swatches shows the history of recent choices — click any swatch to jump back to that color.

It’s part toy, part social experiment: can your visitors agree on a color, or will it descend into a color battle?

Technical details:

  • Colors are stored via the WP object cache when an external cache (Memcached, Redis) is available, making it fast and ephemeral. Without an external cache it falls back to a WP option for persistence.
  • Color history is capped at 100 entries, sorted by timestamp.
  • REST endpoints at hugh/v1/colors (GET) and hugh/v1/colors/add (POST) are public and unauthenticated by design — this is intentional for the live-sharing mechanic.
  • The hugh_css filter lets themes register custom CSS overrides. Twenty Seventeen support is built in; other themes can hook in via add_filter( 'hugh_css', ... ).
  • Colors are rendered as smooth CSS transitions so the page doesn’t flash when a new color arrives.

Note: Hugh works best on sites with an external object cache. Without one, colors are persisted to the database and shared state may lag under concurrent visitors.

Plums

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

导航

说明

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

© 2026 Plums