Fresh out of the oven and still piping hot, I have just released version 1.12.0 of Embed Privacy with several improvements. Find out more in the post.

Performance

Through real-world examples, I notices that Embed Privacy could slow down the content generation quite a bit, especially if there were multiple hundreds or thousands of blocks within the content. This has been fixed in two ways.

Ignoring block types

For several block types, it’s guaranteed that they usually cannot contain embeds. Thus, they are now ignored by default. This approach is rather invasive and ignores any registered block except for the HTML block, as regular blocks – e.g. the embed block – is handled differently. This way, I maintain the general functionality to process blocks by themselves while ignoring most blocks out of the box.

You can use the filter embed_privacy_ignored_blocks to modify the list of ignored blocks if you need.

Caching

Through caching, some repetitive tasks of the list of embed providers are now done only once, resulting in way less executions of their initializing process, even though they were fast. This ensures the most optimal code execution performance possible.

Dynamic content

Dynamic content is always sort of special. While Embed Privacy can handle dynamic content when it triggers one of the available filter within WordPress, e.g. the_content, it can replace the embedded content. However, interacting with the overlay then relies on additional JavaScript, that needs to be loaded. If the JavaScript is not necessary on the page itself without the dynamic content, it won’t be loaded. And this is intentional for performance reason. However, if you need it, you can now enable a new option “Force script loading” to allow loading the script of Embed Privacy on every page to allow interacting with dynamic content.

English content in otherwise translated WordPress instances

It may happen that during installation, there are no translations loaded yet for the locale you’ve set in your WordPress instance. Thus, the general description of the default embed providers stays in English, since it’s only written once to the database during installation.

This is now handled by Embed Privacy 1.12.0 to load such localized content dynamically, if the database contains the English version but you’ve set a different locale.

That’s it

That were the biggest changes for Embed Privacy 1.12.0. For all changes, please visit the changelog.

Reposts

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn more about webmentions)