LLMS_Student_Query::get_default_args()

Retrieve default arguments for a student query


Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.student.query.php

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
protected function get_default_args() {
 
    global $post;
 
    $post_id = ! empty( $post->ID ) ? $post->ID : array();
 
    $args = array(
        'post_id'  => $post_id,
        'sort'     => array(
            'date'       => 'DESC',
            'status'     => 'ASC',
            'last_name'  => 'ASC',
            'first_name' => 'ASC',
            'id'         => 'ASC',
        ),
        'statuses' => array_keys( llms_get_enrollment_statuses() ),
    );
 
    $args = wp_parse_args( $args, parent::get_default_args() );
 
    /**
     * Filters the student query default args
     *
     * @since 3.4.0
     *
     * @param array              $args          Array of default arguments to set up the query with.
     * @param LLMS_Student_Query $student_query Instance of LLMS_Student_Query.
     */
    return apply_filters( 'llms_student_query_default_args', $args, $this );
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
4.10.2 Drop usage of this->get_filter( 'default_args' ) in favor of 'llms_student_query_default_args'.
3.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.