WordPress at Your Fingertips

urlencode_deep() WP 1.0

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

Uses: map_deep()
1 time — 0.000011 sec (very fast) | 50000 times — 0.02 sec (speed of light) | PHP 7.0.8, WP 4.6.1

No Hooks.


Mixed. The encoded value.


urlencode_deep( $value );
$value(mixed) (required)
The array or string to be encoded.


Since 2.2.0 Introduced.

Code of urlencode_deep() WP 5.8.1

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

esc_ (clean validate sanitize)

Helper Functions

No comments
    Log In