LLMS_Admin_Table::clean_args( array $args = array() )

Ensure that a valid array of data is passed to a query.


Description Description

Used by AJAX methods to clean unnecessary parameters before passing the request data to the get_results function.


Top ↑

Parameters Parameters

$args

(array) (Optional) array of arguments

Default value: array()


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/abstracts/abstract.llms.admin.table.php

	protected function clean_args( $args = array() ) {

		$allowed = array_keys( $this->get_args() );

		foreach ( $args as $key => $val ) {
			if ( ! in_array( $key, $allowed ) ) {
				unset( $args[ $key ] );
			}
		}

		return $args;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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