LLMS_Notifications_Query::get_default_args()
Retrieve default arguments for a student query.
Return Return
(array)
Source Source
File: includes/notifications/class.llms.notifications.query.php
protected function get_default_args() {
$args = array(
'post_id' => null,
'subscriber' => null,
'sort' => array(
'updated' => 'DESC',
'id' => 'DESC',
),
'statuses' => array_values( array_diff( $this->get_available_statuses(), array( 'error' ) ) ),
'triggers' => array(),
'types' => array(),
'user_id' => null,
);
$args = wp_parse_args( $args, parent::get_default_args() );
/**
* Filters the notifications query's default args.
*
* @since 3.8.0
* @since 7.1.0 Added `$notifications_query` parameter.
*
* @param array $args Array of default arguments to set up the query with.
* @param LLMS_Notifications_Query $notifications_query Instance of `LLMS_Notifications_Query`.
*/
return apply_filters( 'llms_notifications_query_default_args', $args, $this );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 7.1.0 | Explicitly exclude 'error' status.<br> Drop usage of this->get_filter( 'default_args' ) in favor of 'llms_notification_query_default_args'. |
| 3.8.0 | |
| 3.11.0 | Introduced. |