Skip to content

Commit a64d00e

Browse files
Merge pull request #1076 from cloudinary/fix/classic-editor-audio-files
Fix audio source tags
2 parents 016e533 + 4a56c58 commit a64d00e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

php/class-delivery.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,12 @@ public function parse_element( $element ) {
14781478
// Break element up.
14791479
$attributes = shortcode_parse_atts( $element );
14801480
$tag_element['tag'] = array_shift( $attributes );
1481+
1482+
// Skip audio source tags.
1483+
if ( ! empty( $attributes['type'] ) && 0 === strpos( $attributes['type'], 'audio/' ) && 'source' === $tag_element['tag'] ) {
1484+
return null;
1485+
}
1486+
14811487
// Context Switch Check.
14821488
if ( 'article' === $tag_element['tag'] ) {
14831489
if ( ! empty( $attributes['id'] ) && false !== strpos( $attributes['id'], 'post-' ) ) {

0 commit comments

Comments
 (0)