Open qzya opened 5 months ago
Block processing in https://github.com/Interfacelab/ilab-media-tools/blob/74c3a0031717c77b4baef469a9789fbd3c01439a/classes/Tools/Storage/StorageContentHooks.php#L187 totally breaks markup of WordPress Cover Block: str_replace() adds the mcloud-attachment-{$id} class for class lists that contain such classes like wp-block-cover-is-layout-constrained or wp-block-cover__image-background and not only for class lists that contain the wp-cover-block class.
mcloud-attachment-{$id}
wp-block-cover-is-layout-constrained
wp-block-cover__image-background
wp-cover-block
For example, this markup:
<div class="wp-block-cover"> <span aria-hidden="true" class="wp-block-cover__background has-background-dim"></span> <img class="wp-block-cover__image-background wp-image-220145" > <div class="wp-block-cover__inner-container is-layout-constrained wp-block-cover-is-layout-constrained"> <p class="has-text-align-center has-large-font-size">Cover title</p> </div> </div>
turns to
<div class="wp-block-cover mcloud-attachment-220145"> <span aria-hidden="true" class="wp-block-cover mcloud-attachment-220145__background has-background-dim"></span> <img class="wp-block-cover mcloud-attachment-220145__image-background wp-image-220145" > <div class="wp-block-cover mcloud-attachment-220145__inner-container is-layout-constrained wp-block-cover mcloud-attachment-220145-is-layout-constrained"> <p class="has-text-align-center has-large-font-size">Cover title</p> </div> </div>
Block processing in https://github.com/Interfacelab/ilab-media-tools/blob/74c3a0031717c77b4baef469a9789fbd3c01439a/classes/Tools/Storage/StorageContentHooks.php#L187 totally breaks markup of WordPress Cover Block: str_replace() adds the
mcloud-attachment-{$id}
class for class lists that contain such classes likewp-block-cover-is-layout-constrained
orwp-block-cover__image-background
and not only for class lists that contain thewp-cover-block
class.For example, this markup:
turns to