aguett on "[Plugin: Cache Enabler - WordPress Cache] WebP cached html code is horrible and breaks site"

ساخت وبلاگ

OK so the problem is (halfway) solved.

Regarding the breaking of the site layout, the problem comes from 2 things :

1) Another plugin didn't close a DIV

2) As I suspected the @$dom->loadHTML($data); and retu $dom->saveHtml(); found in the source code to switch images sources from jpeg/png to webp does indeed change the HTML more than it should, as it apparently "tries" to solve the missing DIV problem and breaks the layout.

Now there is only 1 question left: why does my markup gets entirely re-encoded in a different way... I suspect that's because of the choice you made to use @$dom->loadHTML($data); and retu $dom->saveHtml();

Not sure if there was a cleaner way to make your changes from jp(e)g / png to webp, maybe using WordPress filters to change the content and sidebar content could have been a better choice.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 180 تاريخ : يکشنبه 2 خرداد 1395 ساعت: 23:19