-
Notifications
You must be signed in to change notification settings - Fork 83
activitypub_import_mastodon_post_data
github-actions[bot] edited this page Nov 3, 2025
·
10 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 array $post
* @return array The filtered value.
*/
function my_activitypub_import_mastodon_post_data_callback( array $post_data, array $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_dataThe post data to be inserted. -
array$postThe Mastodon Create activity.
\apply_filters( 'activitypub_import_mastodon_post_data', $post_data, $post )Follow @[email protected] for updates and news.