Since which version the $className
has changed?
On many websites the css doesn’t work anymore because the variable $className
didn’t return only the class name for example news
.
Now it returns news wp-block-acf-news
(news.php is the block filename).
$className = 'news';
if( !empty($block['className']) ) {
$className .= ' ' . $block['className'];
}
if( !empty($block['align']) ) {
$className .= ' align' . $block['align'];
}
I often used something like <div class="<?php echo esc_attr($className);?>-border overlay-container">
Now the css can no longer grasp because the class “wp-block-acf-news” is displayed in front of it and not the block class “news” like before…
Is this anything i can change? Or do I have to change all websites and all block classes now?