WordPress at a glance

wp_parse_str() WP 1.0

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

Uses parse_str() and stripslashes if magic_quotes_gpc is on.

Is the basis for: wp_parse_args()
Hooks from the function

Null. Nothing.


wp_parse_str( $string, $array );
$string(string) (required)
The string to be parsed.
$array(array) (required) (passed by reference — &)
Variables will be stored in this array.


Since 2.2.1 Introduced.

Code of wp parse str: wp-includes/formatting.php WP 5.2.4

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 );

Related Functions

From tag: PHP analogues (PHP functions replacement)

More from tag: Supporting (helper utility auxiliary)

More from category: Helper Functions

No comments
    Hello, !     Log In . Register