Blender-org web-assets v2 upgrade #104116

Merged
Márton Lente merged 56 commits from web-assets-v2-upgrade into main 2024-08-13 17:27:59 +02:00
4 changed files with 7 additions and 6 deletions
Showing only changes of commit fef0ebeb41 - Show all commits

View File

@ -108,8 +108,9 @@ if (!function_exists('js_footer')) {
// The images-compare script was modified to work with jQuery 3 (basically replacing .load and .error with .on('load', ...))
wp_enqueue_script('media-compare', get_template_directory_uri() . '/assets/js/jquery.images-compare-0.2.5.js');
}
function js_footer(){
function js_footer();
?>
<script type='text/javascript'>
$(document).ready(function() {
@ -117,9 +118,8 @@ if (!function_exists('js_footer')) {
});
</script>
<?php }
<?php
add_action('wp_footer', 'js_footer');
}
?>
<?php endif; ?>

View File

@ -73,7 +73,7 @@ $style = get_field('style');
<?=$block_id?> {
background-image: <?=$gradient?>;
-webkit-bg-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
<?php endif;?>
@ -89,3 +89,4 @@ $style = get_field('style');
<?=($style ? $style : '')?>
</style>
</div>
<?php endif; ?>

View File

@ -913,7 +913,7 @@ function format_bytes($size, $precision = 2)
return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)];
}
// Map WordPress block editor font-sizes to Blender Web Assets rem sizing
// Map WordPress block editor font-sizing to Blender Web Assets rem sizing
function bwa_map_block_editor_font_sizes() {
$custom_css = 'html { font-size: 62.5%; }';

View File

@ -55,7 +55,7 @@ function lightboxShow() {
let caption = this.getAttribute("data-alt");
// If it's a WP block, or a link, look for images inside.
if (this.nodeName == 'A' || this.classList.contains('wp-block-img')){
if (this.nodeName == 'A' || this.classList.contains('wp-block-image')){
img = this.getElementsByTagName('img')[0];
} else if (this.nodeName == 'IMG') {
img = this;