Query
in package
Query class for database interaction in WordPress
Tags
Table of Contents
- filterUserQuery() : void
- Filter WordPress user queries
- getRepeaterRowsBySubfieldValue() : array<string|int, mixed>
- Get repeater rows by a subfield value.
- getUsersWithFlexibleContentValue() : array<string|int, mixed>
- Get users with a given flexible content custom field value and layout.
Methods
filterUserQuery()
Filter WordPress user queries
public
static filterUserQuery(string $metaKeyDollar, string $metaKeyRegexp) : void
Used to replace placeholders in meta queries ($) for dynamic ACF field names with LIKE instead of = expressions.
Parameters
- $metaKeyDollar : string
-
The meta key with a dollar sign as placholder, as used in WordPress meta queries.
- $metaKeyRegexp : string
-
Meta key in regular expression format.
Tags
Return values
void —getRepeaterRowsBySubfieldValue()
Get repeater rows by a subfield value.
public
static getRepeaterRowsBySubfieldValue(string $field, string $subfield, string $subfieldValue) : array<string|int, mixed>
Parameters
- $field : string
-
The repeater field name.
- $subfield : string
-
The repeater sub field name.
- $subfieldValue : string
-
The repeater sub field value.
Tags
Return values
array<string|int, mixed> —getUsersWithFlexibleContentValue()
Get users with a given flexible content custom field value and layout.
public
static getUsersWithFlexibleContentValue(string $field, string $layout, string $subfield, string $subfieldValue) : array<string|int, mixed>
Parameters
- $field : string
-
The flexible content field name.
- $layout : string
-
The flexible layout name.
- $subfield : string
-
The name of the layouts sub field.
- $subfieldValue : string
-
The value of the layouts sub field.