-
Notifications
You must be signed in to change notification settings - Fork 9
mastodon_api_get_notifications_query_args
github-actions[bot] edited this page Mar 4, 2026
·
3 revisions
Get the WP_Query arguments for fetching notifications.
add_filter( 'mastodon_api_get_notifications_query_args', function( $args, $type ) {
if ( $type === 'notification' ) {
$args['post_type'] = 'notification';
}
return $args;
} );-
array$argsWP_Query arguments. -
string$typeType of notifications. -
Enable_Mastodon_Apps\object$requestRequest object from WP.
array The modified WP_Query arguments.
apply_filters(
'mastodon_api_get_notifications_query_args',
array(
'author__not_in' => array( get_current_user_id() ),
),
'mention',
$request
)