WC_API_Authentication::urlencode_rfc3986()
Encodes a value according to RFC 3986. Supports multidimensional arrays.
Метод класса: WC_API_Authentication{}
Хуков нет.
Возвращает
Строку|Массив
. Encoded values
Использование
$result = WC_API_Authentication::urlencode_rfc3986( $value );
- $value(строка|массив) (обязательный)
- The value to encode
Список изменений
С версии 2.4 | Введена. |
Код WC_API_Authentication::urlencode_rfc3986() WC API Authentication::urlencode rfc3986 WC 8.1.1
public static function urlencode_rfc3986( $value ) { if ( is_array( $value ) ) { return array_map( array( 'WC_API_Authentication', 'urlencode_rfc3986' ), $value ); } else { // Percent symbols (%) must be double-encoded return str_replace( '%', '%25', rawurlencode( rawurldecode( $value ) ) ); } }