wp_parse_str( string $string, array $array )

Parses a string into variables to be stored in an array.


Description Description

Uses parse_str() and stripslashes if magic_quotes_gpc is on.


Parameters Parameters

$string

(string) (Required) The string to be parsed.

$array

(array) (Required) Variables will be stored in this array.


Top ↑

Source Source

File: wp-includes/formatting.php

function wp_parse_str( $string, &$array ) {
	parse_str( $string, $array );
	if ( get_magic_quotes_gpc() )
		$array = stripslashes_deep( $array );
	/**
	 * Filters the array of variables derived from a parsed string.
	 *
	 * @since 2.3.0
	 *
	 * @param array $array The array populated with variables.
	 */
	$array = apply_filters( 'wp_parse_str', $array );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.2.1 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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