| 开发者 | hibira |
|---|---|
| 更新时间 | 2026年11月6日 13:24 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[hibira_readers] shortcode or hibira_readers() template tag.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.assets/vendor/pusher.min.js is the minified build of pusher-js 8.6.0 (MIT), unchanged except for the removed source map comment. Its source is at github.com/pusher/pusher-js, and the same file can be built with npm install pusher-js@8.6.0 (dist/web/pusher.min.js).
define( 'HIBIRA_APP_SECRET', 'your-secret' );
HIBIRA_APP_ID, HIBIRA_APP_KEY and HIBIRA_HOST work the same way.Yes. Pages are served from the cache as usual; the live parts connect from the browser. Visitors' auth requests (readers now, guest order pages) do not need a nonce.
No. Hibira speaks the same protocol as Pusher Channels, so the plugin uses the standard pusher-js library pointed at Hibira. It also works with another Pusher-compatible server if you set its host and port.
Each event counts as one message, however many readers receive it. Readers now uses presence channels: each open tab is one connection, and a channel shows at most 100 members, so busier posts show "100+".
Live comments use WordPress's classic comment markup (li.comment > article.comment-body). To change what is sent, use the hibira_comment_payload filter.
hibira_trigger().