Repository navigation
Conversation
getdave
left a comment
There was a problem hiding this comment.
That's a nice use of the Tag Processor 👏
I guess my only concern is the performance impact. You might need to loop in someone who has expertise in that area for review.
| <?php | ||
| } | ||
|
|
||
| function gutenberg_render_block_block_theme_previews( $block_content, $parsed_block, $block_class ) { |
There was a problem hiding this comment.
We should check for permissions as we do in gutenberg_get_theme_preview_path so that the whole string manipulaiton only happens for logged is users previewing thiemes, otherwise we could just hit the site with bogus requests.
|
I like this solution. Its definitely impactful in terms of performance to do this on the fly string manipulation but given it's specific to when previewing it should be all right. |
|
I'm doing some old PR cleanup. Since there has been no activity in the last two years, I'm going to close this as "stale." |
What?
Persists the block theme preview query parameter on every link.
Related: #50919
Why?
So that users can browse their site when previewing a block theme.
How?
Using the tag processor to update every link on the page.
Testing Instructions
TBD
Testing Instructions for Keyboard
Screenshots or screencast