-
-
Save davidchc/d6b8545a5b1a816a9382cacf503aded0 to your computer and use it in GitHub Desktop.
Traduzir o Calendario do Elementor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('wp_enqueue_scripts', function(){ | |
wp_enqueue_script('flatpickr.pt', 'https://cdnjs.cloudflare.com/ajax/libs/flatpickr/4.6.9/l10n/pt.js', ['flatpickr'], '4.6.9', true); | |
}); | |
add_action('wp_footer', function () { | |
echo "<script> | |
document.addEventListener('DOMContentLoaded', function(){ | |
if(typeof window.flatpickr == 'function' ) { | |
flatpickr.localize(flatpickr.l10ns.pt); | |
} | |
}); | |
</script>"; | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment