تابع ووکامرسی wc_rest_urlencode_rfc3986 رمزگذاری داده با استاندارد RFC 3986

تابع ووکامرسی wc_rest_urlencode_rfc3986 – رمزگذاری داده با استاندارد RFC 3986
Syntax – سینتکس
(string|array) wc_rest_urlencode_rfc3986( (string|array) $value );
Parameters – پارامتر ها (1)
- 1- $value (string|array)
Returns – مقادیر بازگشتی (string|array)
Encoded values.
Usage – نحوه استفاده
if ( !function_exists( 'wc_rest_urlencode_rfc3986' ) ) {
require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-rest-functions.php';
}
// The value to encode.
$value = null;
// NOTICE! Understand what this does before running.
$result = wc_rest_urlencode_rfc3986($value);
Defined – محل تعریف
/includes/wc-rest-functions.php
function wc_rest_urlencode_rfc3986( $value ) {
if ( is_array( $value ) ) {
return array_map( 'wc_rest_urlencode_rfc3986', $value );
} else {
// Percent symbols (%) must be double-encoded.
return str_replace( '%', '%25', rawurlencode( rawurldecode( $value ) ) );
}
}
versions – نسخه ها
از نسخه : 2.6.0
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر