Skip to content
Public template

Latest commit

 

History

239 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

👋 Welcome to Ajaxify Comments

GitHub Actions

License

Lines of code Languages by lines of code Dependencies

GitHub repository

Spin up a test site of the plugin.

Ajaxify Comments allows you to post comments without a page reload. As a bonus, error messages that normally require a page reload for the user are also inline.

ajaxify-comment

🔗 Quick Links

Support

Developers

JavaScript events

Ajaxify Comments dispatches lifecycle events on document. These events do not require the corresponding callback setting to be configured.

Use wpacAfterUpdateComments to initialize functionality after the comments and comment form have been replaced. It runs after comment submission, pagination, lazy loading, and automatic or manual refreshes.

document.addEventListener( 'wpacAfterUpdateComments', function( event ) {
	const { commentUrl, newDom } = event.detail;
	// Initialize functionality for the updated comments.
} );

Use wpacAfterPostComment when the server has accepted a submitted comment but before the comments are replaced. Its event detail contains commentUrl and the unapproved moderation status.

Both events can also be handled through jQuery. Access their details through event.originalEvent.detail:

jQuery( document ).on( 'wpacAfterUpdateComments', function( event ) {
	const { commentUrl, newDom } = event.originalEvent.detail;
} );

Star History

Ultimate-Multisite/wp-ajaxify-comments stars over time

Built with aidevops

This project was created and is maintained with aidevops.sh.

View Ultimate-Multisite on GitHub · aidevops repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages