Incorporare video da streamtape utilizzando il link diretto
21 ott 2020, 23:50:23
Visualizzazioni: 88.7K
Voti: 0
Buongiorno, voglio incorporare questo video nel mio wordpress https://streamtape.com/v/7qDqGjlQe4UA9MR/Soul_Land_03_VOSTFR.mp4
Codice di incorporamento <iframe src="https://streamtape.com/e/7qDqGjlQe4UA9MR/Soul_Land_03_VOSTFR.mp4" width="800" height="600" allowfullscreen allowtransparency allow="autoplay" scrolling="no" frameborder="0"></iframe>
Ho provato ad incollare il seguente codice nel file function.php del mio tema ma non funziona. Sarei molto felice di ricevere il vostro aiuto
// Registra il gestore di embed per streamtape
add_action( 'init', function()
{ wp_embed_register_handler(
'streamtape',
'#https://streamtape\.com\/v\/([a-zA-Z0-9_-]+)$#i',
'streamtape_embed_handler'
);
} );
// Funzione per gestire l'incorporamento di streamtape
function streamtape_embed_handler( $matches, $attr, $url, $rawattr )
{
$embed = sprintf(
'<IFRAME SRC="https://streamtape.com/e/([a-zA-Z0-9_-]+)$#i" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=800 HEIGHT=600 allowfullscreen></IFRAME>',
esc_attr( $matches[1] )
);
return apply_filters( 'streamtape_embed_handler', $embed, $matches, $attr, $url, $rawattr );
}

Ferréol
1
Commenti
Domande correlate
5
risposte