Example plugin for using Backbone.js with WordPress; displays a live comment stream in a widget.
- Upload the plugin
- Activate the plugin
- Add the plugin widget to your sidebar or other widget area
A comment was made on a post, but it didn’t appear in the widget. Why not?
Comments appear once approved – be sure the comment has been approved.
If I unapprove a comment, will it be removed from the widget?
Why is a minimum of WordPress 3.6 required?
This plugin uses Backbone.js 1.0.0, which was added in WordPress 3.6.
Contributors & Developers
“Current Comments” is open source software. The following people have contributed to this plugin.
- Limited the number of comments returned to 10
- Updated to support localization
- Updated to use Backbone 1.0.0 in WordPress 3.6 (collection add merge)
- Changed get_comments query to use DESC so that most recent 10 comments are sent
- Changed ajax update to only fetch any comments added since last query
- Removed highlighting of new comments and replaced it with automatically updating timestamps using moment.js
- Simplified subview logic to simply prepend new comments at the top of the comments view
- Initial release