mirror of
https://ghproxy.net/https://github.com/AlxMedia/curver.git
synced 2025-08-26 10:54:03 +08:00
Fixed featured flexslider not loading images, disable native lazy load
This commit is contained in:
parent
d2bb3c642f
commit
4ff905c2c6
2 changed files with 8 additions and 1 deletions
|
@ -826,4 +826,10 @@ add_action( 'wp_print_footer_scripts', 'curver_skip_link_focus_fix' );
|
|||
|
||||
/* Disable wp lazy load, fix for flexslider
|
||||
/* ------------------------------------ */
|
||||
add_filter('wp_lazy_loading_enabled', '__return_false');
|
||||
add_filter('wp_lazy_loading_enabled', '__return_false');
|
||||
|
||||
function curver_disable_lazy_load_featured_images($attr, $attachment = null) {
|
||||
$attr['loading'] = 'eager';
|
||||
return $attr;
|
||||
}
|
||||
add_filter('wp_get_attachment_image_attributes', 'curver_disable_lazy_load_featured_images');
|
Loading…
Add table
Add a link
Reference in a new issue