تابع ووکامرسی wc_maybe_define_constant تعریف ثابت در PHP
تابع ووکامرسی wc_maybe_define_constant – تعریف ثابت در PHP اگر وجود نداشته باشد .
Syntax – سینتکس
wc_maybe_define_constant( (string) $name, (string) $value );
Parameters – پارامتر ها (2)
- 1- $name (string)
- 2- $value (string)
Usage – نحوه استفاده
if ( !function_exists( 'wc_maybe_define_constant' ) ) { require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-core-functions.php'; } // The name. $name = ''; // The value. $value = ''; // NOTICE! Understand what this does before running. $result = wc_maybe_define_constant($name, $value);
Defined – محل تعریف
/includes/wc-core-functions.php
function wc_maybe_define_constant( $name, $value ) { if ( ! defined( $name ) ) { define( $name, $value ); } }
versions – نسخه ها
از نسخه : 3.0.0
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر