Martin
Forum Replies Created
-
That would be awesome, thanks!
OK, i figured it out myself, it’s pretty easy to do, that’s what I did:
check for
'user'
in$atts
inwpua_edit_shortcode
afteris_user_logged_in()
// Update a different user? $user = $current_user; if ( !empty( $atts['user'] ) && is_numeric( $atts['user'] ) && get_userdata( $atts['user'] ) != false && current_user_can( 'edit_user', $atts['user'] ) ) { $user = get_userdata( $atts['user'] ); }
and change every
$current_user
to$user
.Than send the
$user
or the$user->ID
towpua_edit_form
and make the same modifications in that function.Please have a look at the examples on w3schools.com:
https://www.w3schools.com/html5/att_audio_preload.asp
https://www.w3schools.com/html5/att_video_preload.asp<audio controls="controls" preload="none">
<source src="song.ogg" type="audio/ogg" />
<source src="song.mp3" type="audio/mpeg" />
Your browser does not support the audio element.
</audio>
The plugin is somehow buggy at this, so here’s the fix:
You have to edit the plugin’s .php file and add the preload attribute to the <audio> and <video> tags.
e.g. preload=”none”I just hardcoded that attribute, but you could also look if the autobuffer option is set and react to that but… i don’t need that on my site ??
See HTML documentation:
https://www.w3schools.com/html5/tag_audio.asp
https://www.w3schools.com/html5/tag_video.asp