LLMS_Events_Query::parse_args()

Parses argument data


Return Return

(void)


Top ↑

Source Source

File: includes/class-llms-events-query.php

	protected function parse_args() {

		// Sanitize post & user ids.
		foreach ( array( 'actor', 'actor_not_in', 'object', 'object_not_in', 'include', 'exclude' ) as $key ) {
			$this->arguments[ $key ] = $this->sanitize_id_array( $this->arguments[ $key ] );
		}

		foreach ( array( 'date_before', 'date_after' ) as $key ) {
			if ( ! empty( $this->arguments[ $key ] ) ) {
				$date = $this->arguments[ $key ];
				if ( ! is_numeric( $date ) ) {
					$date = strtotime( $date );
				}
				$this->arguments[ $key ] = date( 'Y-m-d H:i:s', $date );
			}
		}

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.36.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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