LLMS_REST_API_Keys_Query::get_keys()

Retrieve an array of LLMS_REST_API_Keys for the given result set returned by the query


Return Return

(array)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/class-llms-rest-api-keys-query.php

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
public function get_keys() {
 
    $keys    = array();
    $results = $this->get_results();
 
    if ( $results ) {
 
        foreach ( $results as $result ) {
            $keys[] = LLMS_REST_API()->keys()->get( $result->id, true );
        }
    }
 
    if ( $this->get( 'suppress_filters' ) ) {
        return $keys;
    }
 
    /**
     * Filters the list of API Keys
     *
     * @since 1.0.0-beta.1
     *
     * @param LLMS_REST_API_Key[]      $keys           Array of LLMS_REST_API_Key instances.
     * @param LLMS_REST_API_Keys_Query $api_keys_query Instance of LLMS_REST_API_Keys_Query.
     */
    return apply_filters( 'llms_rest_api_key_query_get_keys', $keys, $this );
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.16 Drop usage of this->get_filter( 'get_keys' ) in favor of 'llms_rest_api_key_query_get_keys'.
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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