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.


Top ↑

Parameters Parameters

$key

(string) (Required) Variable key.

$val

(mixed) (Required) Variable value.


Top ↑

Return Return

(void)


Top ↑

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 );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.