context['showImages'] ) ) {
$show_images = $block->context['showImages'];
}
$artist = $attributes['artist'] ?? '';
$image = $attributes['image'] ?? '';
$alt = $attributes['imageAlt'] ?? '';
$length = $attributes['length'] ?? '';
$title = isset( $attributes['title'] ) && ! empty( $attributes['title'] ) ? $attributes['title'] : __( 'Unknown title' );
$html = '
';
$html .= '';
$html .= '';
return $html;
}
/**
* Registers the `core/playlist-track` block on server.
*
* @since 7.1.0
*/
function register_block_core_playlist_track() {
register_block_type_from_metadata(
__DIR__ . '/playlist-track',
array(
'render_callback' => 'render_block_core_playlist_track',
)
);
}
add_action( 'init', 'register_block_core_playlist_track' );