urlencode_deep() WordPress Function

The urlencode_deep() Wordpress function is used to encode URL parameters. This function is useful for encoding URL parameters that contain non-ASCII characters.

urlencode_deep( mixed $value ) #

Navigates through an array, object, or scalar, and encodes the values to be used in a URL.


Parameters

$value

(mixed)(Required)The array or string to be encoded.


Top ↑

Return

(mixed) The encoded value.


Top ↑

Source

File: wp-includes/formatting.php

function urlencode_deep( $value ) {
	return map_deep( $value, 'urlencode' );
}


Top ↑

Changelog

Changelog
VersionDescription
2.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More