-
Notifications
You must be signed in to change notification settings - Fork 82
activitypub_import_mastodon_post_data
github-actions[bot] edited this page Aug 18, 2025
·
8 revisions
Filter the post data before inserting it into the database.
/**
* Filter the post data before inserting it into the database.
*
* @param array $post_data
* @param object $post
* @return array The filtered value.
*/
function my_activitypub_import_mastodon_post_data_callback( array $post_data, object $post ) {
// Your code here.
return $post_data;
}
add_filter( 'activitypub_import_mastodon_post_data', 'my_activitypub_import_mastodon_post_data_callback', 10, 2 );
-
array
$post_data
The post data to be inserted. -
object
$post
The Mastodon Create activity.
\apply_filters( 'activitypub_import_mastodon_post_data', $post_data, $post )
Follow @[email protected] for updates and news.