WordPress audio player causing js error, mediaelementplayer is not a function

I can think of two possible options – although I am not been able to test either right now. Option 1 In theory the cleaner one, as you detect if the mediaelementplayer plugin has loaded itself in the jQuery namespace: <!–Change WordPress Audio Player Default Volume–> <script type=”text/javascript”> jQuery(document).ready(function ($) { if($.fn.mediaelementplayer) { $(“audio”).mediaelementplayer({ success: … Read more

Adding a download link to native WordPress playlist

Thanks to both of you for your help. Just so it might help others, this is what I did: Downloaded a wordpress plugin to allow custom scripts. I used this one >> https://wordpress.org/plugins/header-and-footer-scripts-inserter/ I then pasted this code within the plugin (thanks to Birgire above & HERE : <script type=”text/html” id=”tmpl-wp-playlist-current-item”> <# if ( data.image … Read more

Are .MP3 files with capital letter extensions allowed in [audio] shortcode?

No, apparently not. Until this behavior is changed in version 3.7 you can add this filter to your theme’s functions.php file to include additional extensions. Edited: I’ve updated the filter with better code suggested in the comments. Lower case and uppercase extensions function my_custom_audio_extensions( $exts ) { //merge array of upper case extensions with default … Read more

Audio Playlists – Multiple file type support?

No, it’s not supported currently in the core playlist as I understand it. The following are just some rough ideas: Within the WPPlaylistView.playCurrentSrc() method, in the wp-playlist.js file, we have: this.mejs.setSrc( this.playerNode.attr( ‘src’ ) ); This is currently only for a single source. I checked the definition of srcSet() in MediaElment.js and found: // This … Read more

Extending the Audio Shortcode

I would use the filter wp_audio_shortcode: /** * Filter the audio shortcode output. * * @since 3.6.0 * * @param string $html Audio shortcode HTML output. * @param array $atts Array of audio shortcode attributes. * @param string $audio Audio file. * @param int $post_id Post ID. * @param string $library Media library used for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)