$val) {
if(is_array($val)) {
$w = $val['x1']-$val['x'];
$h = $val['y1']-$val['y'];
$z_rot = isset($val['rotate_z']) ? intval($val['rotate_z']) : 0;
$z_stack = isset( $val['z_index'] ) ? intval( $val['z_index'] ) : ( 10 + (int) $key );
if ( $z_stack < 1 ) {
$z_stack = 10 + (int) $key;
}
$element_style = "left: ".(string)$val['x']."px; top: ".(string)$val['y']."px; z-index: {$z_stack};";
$element_style_table = '';
if(isset($w) && isset($h)){
// Z rotation is applied to the wrap in JS (applyTransforms), not the outer box.
$element_style_table = 'style="width: '.intval($w).'px; height: '.intval($h).'px; transform: rotateZ('.intval($z_rot).'deg); transform-origin: center center;"';
}
$picky_label_position = isset( $val['label_position'] ) ? (string) $val['label_position'] : 'bottom';
if ( ! in_array( $picky_label_position, array( 'top', 'bottom' ), true ) ) {
$picky_label_position = 'bottom';
}
$picky_label_font_size = isset( $val['label_font_size'] ) ? max( 8, min( 200, intval( $val['label_font_size'] ) ) ) : 12;
$picky_label_color_raw = isset( $val['label_color'] ) ? (string) $val['label_color'] : '#333333';
$picky_label_color = picky_sanitize_hex_color( $picky_label_color_raw );
if ( ! $picky_label_color ) {
$picky_label_color = '#333333';
}
$picky_label_font_weight = isset( $val['label_font_weight'] ) ? (string) $val['label_font_weight'] : 'normal';
$picky_allowed_label_w = array( 'normal', 'bold', '300', '400', '500', '600', '700', '800', '900' );
if ( ! in_array( $picky_label_font_weight, $picky_allowed_label_w, true ) ) {
$picky_label_font_weight = 'normal';
}
$picky_show_id = '1';
if ( isset( $val['show_id'] ) && (string) $val['show_id'] === '0' ) {
$picky_show_id = '0';
}
$picky_custom_id = '';
if ( isset( $val['custom_id'] ) && (string) $val['custom_id'] !== '' ) {
$picky_custom_id = sanitize_text_field( (string) $val['custom_id'] );
}
$picky_display_id = $picky_custom_id !== '' ? $picky_custom_id : ( isset( $val['id'] ) ? (string) $val['id'] : '' );
$picky_shape_radius = '';
$picky_shape_bw = 0;
$picky_shape_bc = '#333333';
if ( isset( $val['class'] ) && $val['class'] === 'type-shape' ) {
$picky_shape_radius = ( isset( $val['shape_radius'] ) && (string) $val['shape_radius'] !== '' ) ? (string) max( 0, min( 120, intval( $val['shape_radius'] ) ) ) : '';
$picky_shape_bw = isset( $val['shape_border_width'] ) ? max( 0, min( 32, intval( $val['shape_border_width'] ) ) ) : 0;
$picky_shape_bc = ( isset( $val['shape_border_color'] ) && (string) $val['shape_border_color'] !== '' )
? picky_sanitize_hex_color( (string) $val['shape_border_color'] )
: '#333333';
if ( ! is_string( $picky_shape_bc ) || $picky_shape_bc === '' ) {
$picky_shape_bc = '#333333';
}
}
$picky_square_radius = '';
$picky_saved_class = isset( $val['class'] ) ? (string) $val['class'] : '';
if ( $picky_saved_class !== '' && ! in_array( $picky_saved_class, array( 'type-wall', 'type-text', 'type-shape', 'type-4', 'type-circle' ), true ) ) {
$picky_square_radius = ( isset( $val['square_radius'] ) && (string) $val['square_radius'] !== '' ) ? (string) max( 0, min( 120, intval( $val['square_radius'] ) ) ) : '';
// Only output positive radius; 0/empty = CSS default (8px).
if ( $picky_square_radius === '' || (int) $picky_square_radius <= 0 ) {
$picky_square_radius = '';
}
}
$picky_wall_radius = '';
if ( $picky_saved_class === 'type-wall' ) {
// Empty = CSS default (2px). Explicit 0 = sharp. 1–120 = override.
if ( isset( $val['wall_radius'] ) && (string) $val['wall_radius'] !== '' ) {
$picky_wall_radius = (string) max( 0, min( 120, intval( $val['wall_radius'] ) ) );
}
}
?>
data-shape-radius=""
data-shape-border-width=""
data-shape-border-color=""
0 ) : ?>
data-square-radius=""
data-wall-radius=""
data-icon=""
0 )
? wp_json_encode( $val['services'] )
: '[]';
$picky_default_svc = isset( $val['default_service'] ) ? (string) $val['default_service'] : '';
?>
data-services=""
data-default-service=""
data-service-ids=""
data-custom-id=""
style="">
>
style="display:none;" aria-hidden="true">
style="display:none;" aria-hidden="true">
style="display:none;" aria-hidden="true">
1){ $opacity_val = 1; } ?>