تابع ووکامرسی wc_product_cat_class نمایش کلاس html برای دسته محصولات

تابع ووکامرسی wc_product_cat_class – نمایش کلاس html برای دسته محصولات
Syntax – سینتکس
wc_product_cat_class( (string) $class = '', (null) $category = null );
Parameters – پارامتر ها (2)
- 1- $class (string)
- 2- $category (null)
Usage – نحوه استفاده
if ( !function_exists( 'wc_product_cat_class' ) ) {
require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-template-functions.php';
}
// One or more classes to add to the class list.
$class = '';
// object Optional.
$category = null;
// NOTICE! Understand what this does before running.
$result = wc_product_cat_class($class, $category);
Defined – محل تعریف
/includes/wc-template-functions.php
function wc_product_cat_class( $class = '', $category = null ) {
// Separates classes with a single space, collates classes for post DIV
echo 'class="' . esc_attr( join( ' ', wc_get_product_cat_class( $class, $category ) ) ) . '"';
}
versions – نسخه ها
از نسخه : 2.4.0
نسخه فعلی : 3.0.6
دیگر نسخه ها : 3.0.6 , 3.0.5 , 3.0.4 , 3.0.3 , 3.0.2
ارسال نظر