wp plugin install all-in-one-wp-migration --activate
You must reload the page once before continuing
import ytPlayer from './ytplayer.js'; | |
// Find players from DOM and load if found | |
const players = document.querySelectorAll('.youtube-player'); | |
players.forEach(player => new ytPlayer(player, { | |
height: player.dataset.height ? player.dataset.height : 1280, | |
width: player.dataset.width ? player.dataset.width : 780, | |
autoplay: player.dataset.autoplay ? player.dataset.autoplay : false, | |
videoId: player.dataset.videoId ? player.dataset.videoId : false, | |
})); |
<div class="card"> | |
<?php if ($args['link']) : ?> | |
<a href="<?php echo esc_url($args['link']); ?>" class="global-link"> | |
</a> | |
<?php endif; ?> | |
<div class="card-image"> | |
<?php wp_get_attachment_image($args['image']); ?> | |
</div> |