| | 930 | /** |
| | 931 | * Get all Term data from database by Term field and data. |
| | 932 | * |
| | 933 | * This allows one to short-circuit the default logic, perhaps by |
| | 934 | * replacing it with a routine that is more optimal for your setup. |
| | 935 | * |
| | 936 | * @since 4.6.0 |
| | 937 | * |
| | 938 | * @param string $field Either 'slug', 'name', 'id' (term_id), or 'term_taxonomy_id' |
| | 939 | * @param string|int $value Search for this term value |
| | 940 | * @param string $taxonomy Taxonomy name. Optional, if `$field` is 'term_taxonomy_id'. |
| | 941 | * @param string $output Constant OBJECT, ARRAY_A, or ARRAY_N |
| | 942 | * @param string $filter Optional, default is raw or no WordPress defined filter will applied. |
| | 943 | */ |
| | 944 | $pre = apply_filters( 'pre_get_term_by', null, $field, $value, $taxonomy, $output, $filter ); |
| | 945 | if ( null !== $pre ) { |
| | 946 | return $pre; |
| | 947 | } |
| | 948 | |