تابع ووکامرسی wc_prevent_endpoint_indexing جلوگیری از index شدن صفحه

تابع ووکامرسی wc_prevent_endpoint_indexing جلوگیری از index شدن صفحه

تابع ووکامرسی wc_prevent_endpoint_indexing – جلوگیری از index شدن صفحه مورد نظر

Syntax – سینتکس

wc_prevent_endpoint_indexing(); 

Usage – نحوه استفاده

if ( !function_exists( 'wc_prevent_endpoint_indexing' ) ) { 
    require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-template-functions.php'; 
} 
 
  
// NOTICE! Understand what this does before running. 
$result = wc_prevent_endpoint_indexing(); 
    

Defined – محل تعریف

/includes/wc-template-functions.php

function wc_prevent_endpoint_indexing() { 
    if ( is_wc_endpoint_url() || isset( $_GET['download_file'] ) ) { 
        @header( 'X-Robots-Tag: noindex' ); 
    } 
} 

versions – نسخه ها

از نسخه : 2.5.3

نسخه فعلی : 3.0.6

دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2

ارسال نظر

جهت استفاده از کد حتما از تگ pre استفاده نمایید .

contact us