Skip to content

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.

Example

add_filter( 'mastodon_api_get_notifications_query_args', function( $args, $type ) {
    if ( $type === 'notification' ) {
        $args['post_type'] = 'notification';
    }
    return $args;
} );

Parameters

  • array $args WP_Query arguments.
  • string $type Type of notifications.
  • Enable_Mastodon_Apps\object $request Request object from WP.

Returns

array The modified WP_Query arguments.

Files

apply_filters(
				'mastodon_api_get_notifications_query_args',
				array(
					'author__not_in' => array( get_current_user_id() ),
				),
				'mention',
				$request
			)

Hooks

Clone this wiki locally