AnsPress_Validation::name_to_key()

Description #

Add name value as array key.

Changelog #

VersionDescription
3.0.0Introduced.

Source #

File: includes/class/validation.php

	private function name_to_key() {
		foreach ( (array) $this->args as $k => $f ) {
			if ( isset( $f['name'] ) ) {
				$name = $f['name'];
				unset( $f['name'] );
				unset( $this->args[ $k ] );
				$this->args[ $name ] = $f;
			}
		}
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment