LLMS_Abstract_Posts_Query::set( string $key, mixed $val )
Sets a query variable.
Description Description
Overrides parent method to ensure only allowed post types can be queried.
Parameters Parameters
- $key
-
(string) (Required) Variable key.
- $val
-
(mixed) (Required) Variable value.
Return Return
(void)
Source Source
File: includes/abstracts/llms-abstract-posts-query.php
public function set( $key, $val ) { if ( 'post_types' === $key ) { $val = $this->sanitize_post_types( $val ); } parent::set( $key, $val ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |