mirror of
https://ghproxy.net/https://github.com/AlxMedia/boxstyle.git
synced 2025-08-26 16:44:24 +08:00
Fixed featured flexslider not loading images, disable native lazy load
This commit is contained in:
parent
76a926faa5
commit
5a3ba0ccac
2 changed files with 8 additions and 1 deletions
|
@ -871,4 +871,10 @@ add_action( 'wp_print_footer_scripts', 'boxstyle_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 boxstyle_disable_lazy_load_featured_images($attr, $attachment = null) {
|
||||
$attr['loading'] = 'eager';
|
||||
return $attr;
|
||||
}
|
||||
add_filter('wp_get_attachment_image_attributes', 'boxstyle_disable_lazy_load_featured_images');
|
Loading…
Add table
Add a link
Reference in a new issue