'wavind_render_forecast_block' ) ); register_block_type( WAVIND_DIR . 'blocks/booking-button', array( 'render_callback' => 'wavind_render_booking_block' ) ); } /** * Blocks get WordPress's wrapper (alignment, spacing, the theme's content * width). Without one, the iframe's own `max-width:100%` beats the theme's * content-width rule and the widget runs edge to edge. */ function wavind_render_forecast_block( $attributes ) { $html = wavind_forecast_html( is_array( $attributes ) ? $attributes : array() ); return '' === $html ? '' : '
' . $html . '
'; } function wavind_render_booking_block( $attributes ) { $html = wavind_booking_button_html( is_array( $attributes ) ? $attributes : array() ); return '' === $html ? '' : '
' . $html . '
'; }