WordPress / WordPress/performance
Allow Embed Optimizer to work in Classic block and with Classic Editor
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 461
- Forks
- 165
- Avg merge
- 11h 12m
- Merged PRs (30d)
- 28
Description
Embed Optimizer includes this line in the description:
I recall this was done because only Embed blocks have a FIGURE wrapper which we can use to consistently use with the intersection observer. And it's for the sake of being able to use the plugin with Optimization Detective, so the tag visitor can locate embeds via the FIGURE and child DIV with the expected classes:
For sites using embeds in Classic blocks with or without Optimization Detective, I think we could possibly support them by explicitly filtering the embeds to inject the FIGURE > DIV wrappers.
See also: support forum topic
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with plugins/embed-optimizer/readme.txt and plugins/embed-optimizer/class-embed-optimizer-tag-visitor.php, especially the documented FIGURE and child DIV structure. Trace how embeds are filtered and determine how Classic blocks and the Classic Editor should receive those wrappers; done means supported Classic embeds work with and without Optimization Detective.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100