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(); ?>