تابع ووکامرسی wc_rand_hash ساخت داده هش شده تصادفی

تابع ووکامرسی wc_rand_hash – ساخت داده هش شده تصادفی
Syntax – سینتکس
(string) wc_rand_hash();
Usage – نحوه استفاده
if ( !function_exists( 'wc_rand_hash' ) ) {
require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-core-functions.php';
}
// NOTICE! Understand what this does before running.
$result = wc_rand_hash();
Defined – محل تعریف
/includes/wc-core-functions.php
function wc_rand_hash() {
if ( function_exists( 'openssl_random_pseudo_bytes' ) ) {
return bin2hex( openssl_random_pseudo_bytes( 20 ) );
} else {
return sha1( wp_rand() );
}
}
versions – نسخه ها
از نسخه : 2.4.0
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر