0, ), $atts, 'advaimma_map' ); $post_id = intval( $atts['id'] ); if ( $post_id <= 0 ) { return ''; } $image_id = get_post_meta( $post_id, 'advaimma_image_id', true ); $image_url = $image_id ? wp_get_attachment_image_url( intval( $image_id ), 'full' ) : ''; $spots = get_post_meta( $post_id, 'advaimma_spots', true ); $colors = get_post_meta( $post_id, 'advaimma_colors', true ); // Default colors (fallbacks) $defaults = array( 'title_color' => '#ffffff', 'content_color' => '#ffffff', 'tip_bg_color' => '#333333', 'point_bg_color' => '#000000', 'number_color' => '#ffffff', ); $colors = wp_parse_args( $colors, $defaults ); if ( ! is_array( $spots ) || empty( $spots ) ) { return ''; } ob_start(); ?>
> $s ) : $title = isset( $s['title'] ) ? $s['title'] : ''; $content = isset( $s['content'] ) ? $s['content'] : ''; $icon_image = isset( $s['icon_image'] ) ? esc_url( $s['icon_image'] ) : ''; $link = isset( $s['link'] ) ? esc_url( $s['link'] ) : ''; $trigger = ( isset( $s['trigger'] ) && in_array( $s['trigger'], array( 'hover', 'click' ), true ) ) ? $s['trigger'] : 'hover'; $x = isset( $s['x'] ) ? floatval( $s['x'] ) : 50; $y = isset( $s['y'] ) ? floatval( $s['y'] ) : 50; ?>