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
Parameters Parameters
- $field
-
(string) (Required) Field name/key.
Return Return
(bool)
Source Source
File: includes/class.llms.student.query.php
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | 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. |