Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_parse_str ›

Seit2.2.1
Veraltetn/v
wp_parse_str ( $string, $array )
Parameter: (2)
  • (string) $string The string to be parsed.
    Erforderlich: Ja
  • (array) $array Variables will be stored in this array.
    Erforderlich: Ja
Definiert in:
Codex:

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

Uses {@link https://secure.php.net/parse_str parse_str()} and stripslashes if {@link https://secure.php.net/magic_quotes magic_quotes_gpc} is on.



Quellcode

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