如何使WordPress的WP Featherlight插件像画廊一样处理图像?它允许仅在图像作为图库放置到帖子时滚动图像。但是,如何让它像所有其他类似插件一样滚动帖子中的所有图像呢?
您可以在此处下载插件:https://wordpress.org/plugins/wp-featherlight/
只需要为所有图像调用featherlightGallery()
。可以通过更改findGalleries
函数的代码来完成:
function findGalleries() {
// Treat all images like a gallery
$body.find( 'a[href]' ).filter( testImages ).featherlightGallery();
...
}
针对wpFeatherlight.pkgd.min.js
文件优化了上述代码的版本:
function g(){j.find("a[href]").filter(d).featherlightGallery();...}