| 开发者 | dbhynds |
|---|---|
| 更新时间 | 2016年2月23日 00:01 |
| PHP版本: | 3.1 及以上 |
| WordPress版本: | 4.4.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
src attributes with data-src when the content of a post or page is loaded on the front end of a WordPress site.
lazy-load-xt folder to the /wp-content/plugins/ directoryLazy Load XT filters images added to the page using the_content, post_thumbnail_html, widget_text and get_avatar. If your images are added using another function (wp_get_attachment_image for example), Lazy Load XT does not filter them. However, as of v0.4, you can filter the HTML yourself by passing it to get_lazyloadxt_html.
For example, if a theme has:
echo wp_get_attachment_image($id);
Changing it to the following would lazy load the image:
echo get_lazyloadxt_html( wp_get_attachment_image($id) );
get_lazyloadxt_html() to let users pass HTML to be filteredwp_enqueue_scripts()src with data-src in the_content()