Closed spacedmonkey closed 1 year ago
The method wp_resolve_block_template, results in database queries that are reported, even on theme that do not support block templates.
Something like this might fix the issue.
protected static function wp_resolve_block_template( $template_type, $template_hierarchy, $fallback_template ) { if ( ! function_exists( 'resolve_block_template' ) ) { return null; } if ( ! current_theme_supports( 'block-templates' ) ) { return null; } return resolve_block_template( $template_type, $template_hierarchy, $fallback_template ); }
Looks like current_theme_supports( 'block-templates' ) is indeed what we want, thanks. Fixed in 6b678fd.
current_theme_supports( 'block-templates' )
The method wp_resolve_block_template, results in database queries that are reported, even on theme that do not support block templates.
Something like this might fix the issue.