[wp-trac] [WordPress Trac] #56923: register_block_core_template_part does WP_Query even on themes that do not support it

WordPress Trac noreply at wordpress.org
Wed Nov 9 14:02:04 UTC 2022


#56923: register_block_core_template_part does WP_Query even on themes that do not
support it
------------------------------+--------------------------
 Reporter:  spacedmonkey      |       Owner:  (none)
     Type:  defect (bug)      |      Status:  new
 Priority:  high              |   Milestone:  6.1.1
Component:  Themes            |     Version:  trunk
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:  performance
------------------------------+--------------------------

Comment (by Cybr):

 @peterwilsoncc I think registering stuff at `init` is fair. Though, I also
 think using WP Query before `template_redirect` isn't, let alone misusing
 the Post Types API et co for stuff that isn't a Post Type.

 In that, I think wp_template's foundation should be rewritten without
 considering Post Types but instead something bespoke --- perhaps having a
 new database table if deemed necessary. I believe
 [https://github.com/WordPress/gutenberg/issues/45601 this issue (45601)]
 is already looking into that, but without noting the severity or scope of
 the cause.

 I'm confident the Post Type API eased the integration for storing and
 filtering, but it shouldn't be deemed a long-term strategy. Elementor's
 recklessness is still haunting me; please don't let Gutenberg catch up to
 them.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56923#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list