-
Notifications
You must be signed in to change notification settings - Fork 7
mastodon_api_get_notifications_query_args
Alex Kirk edited this page Aug 1, 2024
·
1 revision
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
$args
WP_Query arguments. -
string
$type
Type of notifications. -
Enable_Mastodon_Apps\object
$request
Request object from WP.
array
The modified WP_Query arguments.
apply_filters(
'mastodon_api_get_notifications_query_args',
array(
'post_type' => Comment_CPT::CPT,
'author__not_in' => array( get_current_user_id() ),
),
'mention',
$request
)