Skip to content

Commit abbe408

Browse files
mikachanellatrixscruffian
committed
Template Activation: Rename gutenberg_get_block_template (#73582)
* Allow 2 args in gutenberg_get_block_template * Fix copy paste error * Simplify fix * Update function name Co-authored-by: mikachan <[email protected]> Co-authored-by: ellatrix <[email protected]> Co-authored-by: scruffian <[email protected]>
1 parent 91fcf6e commit abbe408

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/compat/wordpress-6.9/template-activate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,12 +583,12 @@ function gutenberg_maybe_update_active_templates( $post_id ) {
583583
update_option( 'active_templates', $active_templates );
584584
}
585585

586-
add_action( 'pre_get_block_template', 'gutenberg_get_block_template', 10, 3 );
586+
add_action( 'pre_get_block_template', 'gutenberg_filter_pre_get_block_template', 10, 3 );
587587

588588
///////////////////////////////////////////////////////////////////////
589589
// This function is a copy of core's, except for the marked section. //
590590
///////////////////////////////////////////////////////////////////////
591-
function gutenberg_get_block_template( $output, $id, $template_type ) {
591+
function gutenberg_filter_pre_get_block_template( $output, $id, $template_type ) {
592592
// Check active_templates experiment status.
593593
if ( ! gutenberg_is_experiment_enabled( 'active_templates' ) ) {
594594
return $output;

0 commit comments

Comments
 (0)