The official WordPress plugin for WPSignal. WordSocket enables developers to connect their site to a secure WebSocket relay.
The easiest way is to download is wordpress.org/plugins/wordsocket.
wp plugin install wordsocket --activate// Fire on any WordPress action hook
WPS::trigger( 'comment.posted' )
->on( 'wp_insert_comment', 10, 2 )
->channel( 'events' )
->data( fn( $id, $comment ) => [ 'author' => $comment->comment_author ] )
->register();type Comment = {
// ...
};
// Handle it in the browser
const on = WPS.on( 'comment.posted', (comment: Comment) => {
// Do cool things with the new `comment`
});Full documentation, API reference, and guides are at wpsignal.io/docs.
Full changelog can be viewed in CHANGELOG.md
GPL-2.0-or-later
