Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Student_Query::requires_field( string $field )
Determines if a field should be selected/joined based on searching and sorting arguments
Description Description
Parameters Parameters
- $field
-
(string) (Required) field name/key
Return Return
(bool)
Source Source
File: includes/class.llms.student.query.php
private function requires_field( $field ) { // get the fields we're sorting by to see if we need to select them for the sorting $sort_fields = array_keys( $this->get( 'sort' ) ); if ( in_array( $field, $sort_fields ) ) { return true; } if ( $this->get( 'search' ) ) { $search_fields = array( 'last_name', 'first_name', 'user_email' ); if ( in_array( $field, $search_fields ) ) { return true; } } return false; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.13.0 | Introduced. |