wc_ms_protect_download_rewite_rules مراقبت از لینک های دانلود سایت های چندگانه

تابع ووکامرسی wc_ms_protect_download_rewite_rules – مراقبت از لینک های دانلود در سایت های چندگانه
Syntax – سینتکس
(string) wc_ms_protect_download_rewite_rules( (mixed) $rewrite );
Parameters – پارامتر ها (1)
- 1- $rewrite (mixed)
Usage – نحوه استفاده
if ( !function_exists( 'wc_ms_protect_download_rewite_rules' ) ) {
require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-core-functions.php';
}
// The rewrite.
$rewrite = null;
// NOTICE! Understand what this does before running.
$result = wc_ms_protect_download_rewite_rules($rewrite);
Defined – محل تعریف
/includes/wc-core-functions.php
function wc_ms_protect_download_rewite_rules( $rewrite ) {
if ( ! is_multisite() || 'redirect' == get_option( 'woocommerce_file_download_method' ) ) {
return $rewrite;
}
$rule = "\n# WooCommerce Rules - Protect Files from ms-files.php\n\n";
$rule .= "\n";
$rule .= "RewriteEngine On\n";
$rule .= "RewriteCond %{QUERY_STRING} file=woocommerce_uploads/ [NC]\n";
$rule .= "RewriteRule /ms-files.php$ - [F]\n";
$rule .= " \n\n";
return $rule . $rewrite;
}
versions – نسخه ها
از نسخه : 3.0.2
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر