Form_Category_Manager::map_args( array $args )

Maps form arguments to regular post arguments.

Description

Parameters

$args

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

Return

(array) Mapped arguments.

Source

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

	protected function map_args( $args ) {
		$mapped_args = array();
		foreach ( $args as $property => $value ) {
			switch ( $property ) {
				case 'title':
					$mapped_args['name'] = $value;
					break;
				case 'slug':
				case 'description':
				case 'parent':
					$mapped_args[ $property ] = $value;
			}
		}

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

		return $mapped_args;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.