<?php

if ( ! defined( 'ABSPATH' ) ) { return; }
if ( ! class_exists( 'AIEO_SEO_Breadcrumb' ) ) { return; }

$sep  = isset( $attributes['separator'] ) && '' !== $attributes['separator'] ? (string) $attributes['separator'] : '›';
$html = AIEO_SEO_Breadcrumb::render_current( array( 'separator' => $sep ) );
if ( '' === $html ) {
	return; 
}

$wrapper = function_exists( 'get_block_wrapper_attributes' )
	? get_block_wrapper_attributes( array( 'class' => 'aieo-breadcrumb-block' ) )
	: 'class="aieo-breadcrumb-block"';

echo '<div ' . $wrapper . '>' . $html . '</div>'; 
