Comments (5)
I think this may be the function to polyfill and report potential incompatibility.
from classicpress-v2.
I did a little digging around. There are two things we need to look at:
- Before theme is installed, in the search, WP uses a tag to identify block themes:
full-site-editing
. This is what's used to filter block themes in the themes page search (js code here).- Next step: We need to filter API results to exclude themes tagged with
full-site-editing
in search results.
- Next step: We need to filter API results to exclude themes tagged with
- As @mattyrob suggested, we need
is_block_theme()
function (WP code reference).- Next step: Instead of polyfill, we should restore the function to its original location to reduce merge conflicts. This is where it should be.
- Then we can add necessary checks, notice, and prevent block themes from being activated.
Side note: WP core uses themes API v1.2, but it's not documented anywhere. It does seem to work similarly to v1.1.
from classicpress-v2.
@ElisabettaCarrara thanks for bringing this up.
I agree. We need to deal with block themes.
@xxsimoxx can we use block compatibility feature from #25 to prevent block themes from causing an error?
If we can filter out block themes from theme search, users might accidentally still upload a zip file with block theme. So it would be good if we could prevent errors.
Overall, we should see if it's possible to exclude block themes from theme search in admin.
from classicpress-v2.
@xxsimoxx can we use block compatibility feature from #25 to prevent block themes from causing an error?
Sure @viktorix .
We have to point out which functions can be "polyfilled".
Maybe also check for full-site-editing tag
.
from classicpress-v2.
I have to point out one thing, some block themes do work, the ones having fallback code for the customizer. The completely FSE block themes either have a notice upon activation like Twenty-twentythree that they are broken OR they crash the site without the notice. So we could just exclude the ones that do not have the fallback code to use the customizer? but then again as you say we still do need the polyfills because the block themes can throw errors and even with customizer code they sometimes malfunction.
from classicpress-v2.
Related Issues (20)
- π ... causes problems with classic-SEO using php 8.1 ... HOT 19
- deprecation
- π Quick Edit break columns HOT 10
- π Uncaught Error: Call to undefined function unregister_block_type()
- π‘ WordPress block-related functions list HOT 5
- wp-login not accessibleπ HOT 4
- ClassicPress plugins showing update from WordPress pluginsπ HOT 4
- βΏ Accessability: Use <details> for "Add menu items" accordion sections HOT 4
- βΏ Accessibility: Better feedback when moving nav menu items HOT 4
- π‘ Add Gravatar generated robot avatars HOT 1
- Improve forms with HTML5 input types HOT 1
- π‘ Enable Client-side Comment Form Validation HOT 1
- Rebuild widgets screen (and equivalent in Customizer) to use details and summary tags HOT 5
- About screen after update still refers to CP being fork of WP 4.9 HOT 2
- ` wp doctor check core-verify-checksums` not working π HOT 2
- π‘ Add `wp_body_open` hook to included themes HOT 2
- Replace jQuery UI in CP back-end: First Step: Draggable, Droppable, Sortable HOT 2
- π Adding placeholder supports for WPDB implemented in WP 6.2+ HOT 3
- TinyMCE in Text Widget HOT 3
- π Edit Post in Visual is "blank" and mce-editor button is stacked (one under other) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from classicpress-v2.