[wp-trac] [WordPress Trac] #62319: There is a flash when clicking the template name in the editor if a plugin registered template matches a default WP theme template
WordPress Trac
noreply at wordpress.org
Tue Oct 29 08:58:47 UTC 2024
#62319: There is a flash when clicking the template name in the editor if a plugin
registered template matches a default WP theme template
--------------------------+-----------------------------
Reporter: aljullu | Owner: aljullu
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: trunk
Severity: normal | Keywords:
Focuses: ui, template |
--------------------------+-----------------------------
Same as this GitHub issue:
https://github.com/WordPress/gutenberg/issues/65584
**Steps to reproduce:**
0. Assuming you are using a theme with a `page.html` template (ie: Twenty
Twenty Four).
1. Add this code snippet to your site:
{{{#!php
<?php
add_action( 'init', function() {
register_block_template(
'templates//page',
[
'title' => 'My Single Page',
'description' => 'This is my single page
template',
'content' => '<!-- wp:paragraph --><p>This is a
plugin-registered template.</p><!-- /wp:paragraph -->',
'post_types' => [ 'page' ],
]
);
} );
}}}
2. Go to the New page screen.
3. Click on the ''Pages'' button next to the ''Templates'' label.
4. Notice a flash.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62319>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list