File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 3
3
* @Author: nguyen
4
4
* @Date: 2020-02-12 14:01:01
5
5
* @Last Modified by: Alex Dong
6
- * @Last Modified time: 2020-03-20 10:20:28
6
+ * @Last Modified time: 2020-05-14 10:00:26
7
7
*/
8
8
9
9
namespace Magepow \Lazyload \Plugin ;
@@ -166,10 +166,8 @@ function($match) use ($placeholder) {
166
166
167
167
if (stripos ($ match [0 ], ' data-src=" ' ) !== false ) return $ match [0 ];
168
168
169
- if ($ match [1 ]){
170
-
169
+ if (stripos ($ match [0 ], ' class=" ' ) !== false ){
171
170
if ( $ this ->isExclude ($ match [1 ]) ) return $ match [0 ];
172
-
173
171
$ lazy = str_replace (' class=" ' , ' class="lazyload ' , $ match [0 ]);
174
172
}else {
175
173
$ lazy = str_replace ('<img ' , '<img class="lazyload" ' , $ match [0 ]);
@@ -193,10 +191,8 @@ function($match) use ($placeholder) {
193
191
194
192
if (stripos ($ match [0 ], ' data-src=\" ' ) !== false ) return $ match [0 ];
195
193
196
- if ($ match [1 ]){
197
-
194
+ if (stripos ($ match [0 ], ' class=" ' ) !== false ){
198
195
if ( $ this ->isExclude ($ match [1 ]) ) return $ match [0 ];
199
-
200
196
$ lazy = str_replace (' class=\" ' , ' class=\"lazyload ' , $ match [0 ]);
201
197
}else {
202
198
$ lazy = str_replace ('<img ' , '<img class=\"lazyload\" ' , $ match [0 ]);
You can’t perform that action at this time.
0 commit comments