Blender-org web-assets v2 upgrade #104116
@ -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', ...))
|
// 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');
|
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'>
|
<script type='text/javascript'>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
@ -117,9 +118,8 @@ if (!function_exists('js_footer')) {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php }
|
<?php
|
||||||
add_action('wp_footer', 'js_footer');
|
add_action('wp_footer', 'js_footer');
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -73,7 +73,7 @@ $style = get_field('style');
|
|||||||
|
|
||||||
<?=$block_id?> {
|
<?=$block_id?> {
|
||||||
background-image: <?=$gradient?>;
|
background-image: <?=$gradient?>;
|
||||||
-webkit-bg-clip: text;
|
-webkit-background-clip: text;
|
||||||
-webkit-text-fill-color: transparent;
|
-webkit-text-fill-color: transparent;
|
||||||
}
|
}
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
@ -89,3 +89,4 @@ $style = get_field('style');
|
|||||||
<?=($style ? $style : '')?>
|
<?=($style ? $style : '')?>
|
||||||
</style>
|
</style>
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
@ -913,7 +913,7 @@ function format_bytes($size, $precision = 2)
|
|||||||
return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)];
|
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() {
|
function bwa_map_block_editor_font_sizes() {
|
||||||
$custom_css = 'html { font-size: 62.5%; }';
|
$custom_css = 'html { font-size: 62.5%; }';
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ function lightboxShow() {
|
|||||||
let caption = this.getAttribute("data-alt");
|
let caption = this.getAttribute("data-alt");
|
||||||
|
|
||||||
// If it's a WP block, or a link, look for images inside.
|
// 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];
|
img = this.getElementsByTagName('img')[0];
|
||||||
} else if (this.nodeName == 'IMG') {
|
} else if (this.nodeName == 'IMG') {
|
||||||
img = this;
|
img = this;
|
||||||
|
Loading…
Reference in New Issue
Block a user