Comment System
The Extra Chill Platform implements a unified, network-wide comment system that integrates the main content site with community profiles and Gutenberg-based editing.
Core Features
1. Auto-Approval for Authenticated Users
To streamline engagement, comments from logged-in users are automatically approved, bypassing the standard moderation queue.
- Implementation:
extrachill-users/inc/comment-auto-approval.php - Mechanism: Filters
pre_comment_approvedto return1for authenticated users.
2. Multisite Author Routing
Comment author links are routed to centralized community profiles to maintain identity consistency across the multisite network.
- Implementation:
extrachill-users/inc/author-links.php - Function:
ec_get_comment_author_link_multisite() - Target:
https://community.extrachill.com/u/{username}/
3. Cross-Site Comment Aggregation
User comments from the main journalism site (Blog ID 1) are aggregated and displayed within the community ecosystem.
- Implementation:
extrachill-community/inc/content/main-site-comments.php - Display Locations:
- User Profiles (Comments tab)
/blog-commentscentralized feed
- Mechanism: Uses
switch_to_blog(1)to retrieve comments for a specific user ID.
4. Gutenberg Integration
Comments support the WordPress Block Editor, allowing users to use blocks (images, lists, etc.) within their comments.
- Plugin:
blocks-everywhereenables Gutenberg functionality in the comment transition and display.
5. Access Control & Theme Integration
The platform enforces a "Login to Comment" policy to ensure accountability and enable the auto-approval workflow.
- Implementation:
extrachill/inc/single/comments.php - Requirement: Users must be logged in to view the comment form. Unauthenticated users are presented with a login/register block.
Technical Flow
- Authentication: Theme checks
is_user_logged_in(). - Submission: User submits comment via Gutenberg-enabled editor.
- Approval:
extrachill-usersauto-approves the comment if the user is logged in. - Linking:
extrachill-usersfilters the author link to point to the community profile. - Aggregation:
extrachill-communitypulls the comment into the user’s global activity feed.