LLMS_Abstract_Query::setup_args()

Setup arguments prior to a query.


Return Return

(void)


Top ↑

Source Source

File: includes/abstracts/llms-abstract-query.php

	protected function setup_args() {

		$this->arguments = wp_parse_args( $this->arguments_original, $this->arguments_default );

		$this->parse_args();

		if ( ! $this->get( 'suppress_filters' ) ) {
			/**
			 * Filters the parsed query arguments.
			 *
			 * The dynamic part of the filter `$this->id` identifies the extending query.
			 *
			 * @since 4.5.1
			 *
			 * @param array               $ars           The query parse arguments.
			 * @param LLMS_Database_Query $db_query      The LLMS_Database_Query instance.
			 * @param array               $original_args Original arguments before merging with defaults.
			 * @param array               $default_args  Default arguments before merging with original.
			 */
			$this->arguments = apply_filters( "llms_{$this->id}_query_parse_args", $this->arguments, $this, $this->arguments_original, $this->arguments_default );
		}

		foreach ( $this->arguments as $arg => $val ) {

			$val = 'sort' === $arg ? $this->sanitize_sort( $this->arguments['sort'] ) : $val;
			$this->set( $arg, $val );

		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Moved from LLMS_Database_Query abstract.
4.5.1 Added filter "llms_{$this->id}_query_parse_args".
3.8.0
3.34.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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