BP_Optout::get( array $args = array() )
Get opt-outs, based on provided filter parameters.
Description Description
Parameters Parameters
- $args
-
(Optional) Associative array of arguments. All arguments but $page and $per_page can be treated as filter values for get_where_sql() and get_query_clauses(). All items are optional.
- 'id'
(int|array) ID of opt-out. Can be an array of IDs. - 'email_address'
(string|array) Email address of users who have opted out being queried. Can be an array of addresses. - 'user_id'
(int|array) ID of user whose communication prompted the opt-out. Can be an array of IDs. - 'email_type'
(string|array) Name of the emil type to filter by. Can be an array of email types. - 'search_terms'
(string) Term to match against email_address field. - 'order_by'
(string) Database column to order by. - 'sort_order'
(string) Either 'ASC' or 'DESC'. - 'page'
(int) Number of the current page of results. Default: false (no pagination, all items). - 'per_page'
(int) Number of items to show per page. Default: false (no pagination, all items). - 'fields'
(string) Which fields to return. Specify 'email_addresses' to fetch a list of opt-out email_addresses. Specify 'user_ids' to fetch a list of opt-out user_ids. Specify 'ids' to fetch a list of opt-out IDs. Default: 'all' (return BP_Optout objects).
Default value: array()
- 'id'
Return Return
(array) BP_Optout objects | IDs of found opt-outs | Email addresses of matches.
Source Source
File: bp-core/classes/class-bp-optout.php
Changelog Changelog
Version | Description |
---|---|
8.0.0 | Introduced. |