Skip to content

Audio filetype fallback stops working #1

@YaguangZhang

Description

@YaguangZhang

The current version (v 2.7.1) of this plugin breaks the filetype fallback feature of the default WordPress [audio] shortcut. For example, only the .wav file will be included in the final HTML code for:

[audio mp3="source.mp3" ogg="source.ogg" wav="source.wav"]

It seems this issues is caused by lines 635-640 in wavesurfer-wp.php:

		// Check audio type to determine the link
		if ( isset( $attr['wav'] ) ) { $link = $attr['wav']; }
		if ( isset( $attr['mp3'] ) ) { $link = $attr['mp3']; }
		if ( isset( $attr['m4a'] ) ) { $link = $attr['m4a']; }
		if ( isset( $attr['ogg'] ) ) { $link = $attr['ogg']; }
		if ( isset( $attr['src'] ) ) { $link = $attr['src']; }

But I'm not quite sure how to fix it. Could you please have a look? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions