LLMS_Membership::query_associated_posts( string $post_type, string $enabled_key, string $enabled_value, string $list_key )
Performs a WPDB query to retrieve posts associated with the membership
Description Description
See also See also
Parameters Parameters
- $post_type
-
(Required) Post type to query for an association with.
- $enabled_key
-
(Required) A meta key name, used to check if the association is enabled for the associated post. For example: "_llms_is_restricted"
- $enabled_value
-
(Required) The meta value of the
$enabled_key
when the association is enabled. For example "yes" when checking "_llms_is_restricted".. - $list_key
-
(Required) The meta key name where associations are stored as a serialized array of WP_Post IDs. For example "_llms_restricted_levels".
Return Return
(int[])
Source Source
File: includes/models/model.llms.membership.php
Changelog Changelog
Version | Description |
---|---|
4.0.0 | Escape { character in SQL query to add MySQL 8.0 support. |
3.38.1 | Introduced. |