تابع ووکامرسی wc_placeholder_img دریافت نگه دارنده تصویر ( placeholder )

تابع ووکامرسی wc_placeholder_img دریافت نگه دارنده تصویر ( placeholder )

تابع ووکامرسی wc_placeholder_img – دریافت نگه دارنده تصویر ( placeholder )

Syntax – سینتکس

(string) wc_placeholder_img( (string) $size = 'shop_thumbnail' ); 

Parameters – پارامتر ها (1)

  • 1- $size (string)

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

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

Defined – محل تعریف

/includes/wc-product-functions.php

function wc_placeholder_img( $size = 'shop_thumbnail' ) { 
    $dimensions = wc_get_image_size( $size ); 
 
    return apply_filters( 'woocommerce_placeholder_img', '' . esc_attr__( 'Placeholder', woocommerce ) . '', $size, $dimensions ); 
} 

versions – نسخه ها

از نسخه : 3.0.2

نسخه فعلی : 3.0.6

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

ارسال نظر

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

contact us