Commit 75cf8b94 authored by imac's avatar imac

[Update]Product page : Add H/W fields to format icon

parent 8dd0fa18
...@@ -381,8 +381,13 @@ function nap_icon_format($name){ ...@@ -381,8 +381,13 @@ function nap_icon_format($name){
$termID = $term->term_id; $termID = $term->term_id;
$active = get_field('format_icone_active', 'pa_format_' . $termID); $active = get_field('format_icone_active', 'pa_format_' . $termID);
$inactive = get_field('format_icone_inactive', 'pa_format_' . $termID); $inactive = get_field('format_icone_inactive', 'pa_format_' . $termID);
$iconHeight = get_field('hauteur_icone', 'pa_format_' . $termID);
$iconWidth = get_field('largeur_icone', 'pa_format_' . $termID);
$icons['active']=$active; $icons['active']=$active;
$icons['inactive']=$inactive; $icons['inactive']=$inactive;
$icons['height']= $iconHeight;
$icons['width']= $iconWidth;
return $icons; return $icons;
......
...@@ -60,7 +60,7 @@ if (!function_exists('print_attribute_radio')) { ...@@ -60,7 +60,7 @@ if (!function_exists('print_attribute_radio')) {
} else { } else {
$icons = nap_icon_format($value); $icons = nap_icon_format($value);
$format_img='<img src="'.$icons['inactive'].'" data-img = "'.$icons['inactive'].'" data-img-active = "'.$icons['active'].'" id="format_'.$index.'">'; $format_img='<img src="'.$icons['inactive'].'" data-img = "'.$icons['inactive'].'" data-img-active = "'.$icons['active'].'" id="format_'.$index.'" style ="height:'.$icons['height'].'px;width:'.$icons['width'].'px" >';
$filtered_label = apply_filters('woocommerce_variation_option_name', $label); $filtered_label = apply_filters('woocommerce_variation_option_name', $label);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment