[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
Thu Oct 27 20:32:55 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:  normal        |  Milestone:  Awaiting Review
Component:  Themes        |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+-----------------------------
 register_block_core_template_part functions calls,
 build_template_part_block_variations ->
 build_template_part_block_instance_variations ->
 get_block_templates.

 This calls WP_Query and gets ALL posts of post type `wp_template_part`.
 This happens on classic themes that do not even support theme parts.

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


More information about the wp-trac mailing list