Skip to content

Comments Actions

14 unique action hooks currently map to this category, across 18 call sites.

Hook Inventory

HookEditionCall SitesFirst Source
fluent_community/before_comment_createCore1fluent-community/app/Http/Controllers/CommentsController.php:126
fluent_community/before_comment_deleteCore1fluent-community/app/Http/Controllers/CommentsController.php:564
fluent_community/check_rate_limit/create_commentCore1fluent-community/app/Http/Controllers/CommentsController.php:68
fluent_community/comment_addedCore + PRO2fluent-community-pro/app/Http/Controllers/ModerationController.php:199
fluent_community/comment_deletedCore1fluent-community/app/Http/Controllers/CommentsController.php:577
fluent_community/comment_updatedCore1fluent-community/app/Http/Controllers/CommentsController.php:252
fluent_community/comment/media_deletedCore2fluent-community/app/Http/Controllers/CommentsController.php:246
fluent_community/comment/new_comment_{comment}Core1fluent-community/app/Http/Controllers/CommentsController.php:158
fluent_community/comment/react_addedCore1fluent-community/app/Http/Controllers/CommentsController.php:622
fluent_community/comment/react_removedCore1fluent-community/app/Http/Controllers/CommentsController.php:634
fluent_community/comment/updatedCore1fluent-community/app/Http/Controllers/CommentsController.php:304
fluent_community/notification/comment/notifed_to_authorCore2fluent-community/app/Hooks/Handlers/NotificationEventHandler.php:273
fluent_community/notification/comment/notifed_to_mentionsCore1fluent-community/app/Hooks/Handlers/NotificationEventHandler.php:415
fluent_community/notification/comment/notifed_to_thread_commetenterCore2fluent-community/app/Hooks/Handlers/NotificationEventHandler.php:543

fluent_community/before_comment_create

  • Type: action
  • Edition: Core
  • Call sites: 1
  • When it fires: Before Comment Create hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/CommentsController.php:126$commentData (Comment

Example

php
add_action('fluent_community/before_comment_create', function ($commentData, $feed) {
}, 10, 2);

fluent_community/before_comment_delete

  • Type: action
  • Edition: Core
  • Call sites: 1
  • When it fires: Before Comment Delete hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/CommentsController.php:564$comment (Comment

Example

php
add_action('fluent_community/before_comment_delete', function ($comment) {
}, 10, 1);

fluent_community/check_rate_limit/create_comment

  • Type: action
  • Edition: Core
  • Call sites: 1
  • When it fires: Check Rate Limit/Create Comment hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/CommentsController.php:68$user (mixed)

Example

php
add_action('fluent_community/check_rate_limit/create_comment', function ($user) {
}, 10, 1);

fluent_community/comment_added

  • Type: action
  • Edition: Core + PRO
  • Call sites: 2
  • When it fires: Comment Added hook emitted from the current call site.

Call Sites

EditionSourceParameters
PROfluent-community-pro/app/Http/Controllers/ModerationController.php:199$content (mixed)
$feed (Feed
Corefluent-community/app/Http/Controllers/CommentsController.php:168$comment (Comment

Example

php
add_action('fluent_community/comment_added', function ($content, $feed) {
}, 10, 2);

fluent_community/comment_deleted

  • Type: action
  • Edition: Core
  • Call sites: 1
  • When it fires: Comment Deleted hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/CommentsController.php:577$commentId (Comment

Example

php
add_action('fluent_community/comment_deleted', function ($commentId, $feed) {
}, 10, 2);

fluent_community/comment_updated

  • Type: action
  • Edition: Core
  • Call sites: 1
  • When it fires: Comment Updated hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/CommentsController.php:252$comment (Comment

Example

php
add_action('fluent_community/comment_updated', function ($comment, $feed) {
}, 10, 2);

fluent_community/comment/media_deleted

  • Type: action
  • Edition: Core
  • Call sites: 2
  • When it fires: Comment/Media Deleted hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/CommentsController.php:246$otherMedias (mixed)
Corefluent-community/app/Http/Controllers/CommentsController.php:567$comment->media (Comment

Example

php
add_action('fluent_community/comment/media_deleted', function ($otherMedias) {
}, 10, 1);

fluent_community/comment/new_comment_{comment}

  • Type: action
  • Edition: Core
  • Call sites: 1
  • When it fires: Comment/New Comment {Comment} hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/CommentsController.php:158$comment (Comment

Example

php
add_action('fluent_community/comment/new_comment_{comment}', function ($comment, $feed) {
}, 10, 2);

fluent_community/comment/react_added

  • Type: action
  • Edition: Core
  • Call sites: 1
  • When it fires: Comment/React Added hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/CommentsController.php:622$reaction (mixed)
$comment (Comment

Example

php
add_action('fluent_community/comment/react_added', function ($reaction, $comment, $feed) {
}, 10, 3);

fluent_community/comment/react_removed

  • Type: action
  • Edition: Core
  • Call sites: 1
  • When it fires: Comment/React Removed hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/CommentsController.php:634$comment (Comment

Example

php
add_action('fluent_community/comment/react_removed', function ($comment, $feed) {
}, 10, 2);

fluent_community/comment/updated

  • Type: action
  • Edition: Core
  • Call sites: 1
  • When it fires: Comment/Updated hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Http/Controllers/CommentsController.php:304$comment (Comment

Example

php
add_action('fluent_community/comment/updated', function ($comment, $dirty) {
}, 10, 2);

fluent_community/notification/comment/notifed_to_author

  • Type: action
  • Edition: Core
  • Call sites: 2
  • When it fires: Notification/Comment/Notifed To Author hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Hooks/Handlers/NotificationEventHandler.php:273[ 'user_ids' => [$feed->user_id], 'notification' => $exist, 'key' => 'notifed_to_author', 'comment' => $comment, 'feed' => $feed, 'created' => false ] (array)
Corefluent-community/app/Hooks/Handlers/NotificationEventHandler.php:299[ 'user_ids' => [$feed->user_id], 'notification' => $notification, 'comment' => $comment, 'key' => 'notifed_to_author', 'feed' => $feed, 'created' => true ] (array)

Example

php
add_action('fluent_community/notification/comment/notifed_to_author', function ($user_id) {
}, 10, 1);

fluent_community/notification/comment/notifed_to_mentions

  • Type: action
  • Edition: Core
  • Call sites: 1
  • When it fires: Notification/Comment/Notifed To Mentions hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Hooks/Handlers/NotificationEventHandler.php:415[ 'user_ids' => $mentionedUserIds, 'notification' => $mentionNotification, 'key' => 'notifed_to_mentions', 'comment' => $comment, 'feed' => $feed ] (array)

Example

php
add_action('fluent_community/notification/comment/notifed_to_mentions', function ($mentionedUserIds) {
}, 10, 1);

fluent_community/notification/comment/notifed_to_thread_commetenter

  • Type: action
  • Edition: Core
  • Call sites: 2
  • When it fires: Notification/Comment/Notifed To Thread Commetenter hook emitted from the current call site.

Call Sites

EditionSourceParameters
Corefluent-community/app/Hooks/Handlers/NotificationEventHandler.php:543[ 'user_ids' => $childCommentUserIds, 'notification' => $existingNotification, 'key' => 'notifed_to_thread_commetenter', 'comment' => $comment, 'feed' => $feed ] (array)
Corefluent-community/app/Hooks/Handlers/NotificationEventHandler.php:580[ 'user_ids' => $childCommentUserIds, 'notification' => $notification, 'key' => 'notifed_to_thread_commetenter', 'comment' => $comment, 'feed' => $feed ] (array)

Example

php
add_action('fluent_community/notification/comment/notifed_to_thread_commetenter', function ($childCommentUserIds) {
}, 10, 1);

FluentCommunity developer documentation