Form_Category_Query::map_args( array $args )

Maps form query arguments to regular post query arguments.

Description

Parameters

$args

(array) (Required) Arguments as $query_var => $value pairs.

Return

(array) Mapped arguments.

Source

File: src/db-objects/form-categories/form-category-query.php

	protected function map_args( $args ) {
		$mapped_args = $args;
		foreach ( $args as $query_var => $value ) {
			switch ( $query_var ) {
				case 'title':
					$mapped_args['name'] = $value;
					unset( $mapped_args['title'] );
					break;
				case 'orderby':
					if ( 'title' === $value ) {
						$mapped_args[ $query_var ] = 'name';
					}
					break;
			}
		}

		$mapped_args['hide_empty'] = false;
		$mapped_args['taxonomy']   = $this->manager->get_prefix() . 'form_category';

		return $mapped_args;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.