do_action( 'clanbite_social_kit_post_created', int $id, array $data )Fires when a social post is created.
Used by the mentions system to parse @mentions and send notifications.
Other plugins that publish a post on a member's behalf fire the same action with system_generated (bool, true) and a source slug in $data; listeners that reward posting (Points) must ignore those.
Action PHP
Parameters
$id(int)Post ID.
$data(array)Post data including
content,author_id,post_type,team_id,group_id,feed_context,feed_subject_idandhas_poll(bool).
Example
add_action( 'clanbite_social_kit_post_created', function ( $id, $data ) {
// Run your code.
}, 10, 2 );Defined in inc/Rest/Rest_Controller.php
Changelog
| Version | Description |
|---|---|
| 1.3.0 | Updated. |