-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pattern: Experiment with using template slots for content replacement #50777
Conversation
Size Change: -1.16 kB (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
6ff975d
to
f76a7f6
Compare
'', | ||
array( | ||
'<!-- wp:paragraph {"fontSize":"huge"} -->', | ||
'<p class="has-huge-font-size"></$wp:template-content name="getInTouch"></p>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the /
in the right place for $wp:template-content
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was experimenting with the idea of the tag closer that gets converted to the HTML comment in the browser. In effect, if you never replace </$wp:template-content name="getInTouch">
with the content, the block will still get rendered correctly for the site editors because it will simply skip this syntax for the content placeholder.
@dmsnell came up with the idea of using something like </$wp:template-content>
. The interesting aspect of it is that it can be matched with the HTML tag processor when visiting closing HTML tags.
As noted in #50649 (comment), I started implementing the concept of converting all template content data into virtual blocks |
What?
Exploring ideas shared by @dmsnell in #50456 (comment).
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast