
外掛標籤
開發者團隊
原文外掛簡介
Hibira Realtime makes your site update while people are looking at it. It uses Hibira, a hosted realtime service that speaks the Pusher Channels protocol, so your server never holds WebSocket connections open. Pages stay cacheable.
Live comments. An approved comment shows up for everyone reading the post, without a reload. Replies go under their parent comment.
Post updated notice. When you update a published post, its readers see a notice with a Reload button.
Readers now. A small “12 reading now” counter on posts, in a corner of the page or wherever you put the [hibira_readers] shortcode or hibira_readers() template tag.
WooCommerce order status. The order received and view order pages change when the order status changes, so customers waiting on “Processing” see “Completed” the moment you mark it.
Admin notices. A notice in wp-admin when an order comes in or a comment awaits approval.
For developers. hibira_trigger( $channels, $event, $data ) sends your own events, and HibiraWP.pusher() in the browser subscribes to them. Private and presence channels are signed by /wp-json/hibira/v1/auth and decided by the hibira_authorize_channel filter.
Hibira’s free plan (no card) covers a typical blog: 100 concurrent connections and 200,000 messages a day.
External service
This plugin connects to Hibira (ws.hibira.io by default, or the host you set):
Your server sends events (comment author name, avatar URL and comment text of approved comments; post modified time; order status; order number and total for admin notices) to Hibira’s HTTP API when they happen.
Visitors’ browsers open a WebSocket connection to Hibira on posts and order pages, to receive those events. For the readers-now count, each browser joins with a random ID; no names or personal data are sent.
Hibira’s terms and privacy policy.
Source code and libraries
The plugin’s source, with its tests, is at github.com/hibira-io/wordpress.
assets/vendor/pusher.min.js is the minified build of [pusher-js](https://github.com/pusher/pusher-js) 8.6.0 (MIT), unchanged except for the removed source map comment. Its source is at [github.com/pusher/pusher-js](https://github.com/pusher/pusher-js), and the same file can be built with `npm install [email protected]` (`dist/web/pusher.min.js`).
