Make WordPress Core


Ignore:
Timestamp:
10/09/2024 10:09:30 PM (2 years ago)
Author:
peterwilsoncc
Message:

Editor: Remove prefix from wp_(un)register_block_template() functions.

Removes the wp_ prefix from block template registration functions for consistency with other block related registration functions.

  • wp_register_block_template() becomes register_block_template().
  • wp_unregister_block_template() becomes unregister_block_template().

Props aljullu, aristath, youknowriad, swissspidy.
Fixes #62193.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/block-template.php

    r59073 r59201  
    444444                $template_name = 'test-plugin//test-template';
    445445
    446                 wp_register_block_template( $template_name );
     446                register_block_template( $template_name );
    447447
    448448                $templates = get_block_templates();
    … …  
    450450                $this->assertArrayHasKey( $template_name, $templates );
    451451
    452                 wp_unregister_block_template( $template_name );
     452                unregister_block_template( $template_name );
    453453        }
    454454
    … …  
    466466                );
    467467
    468                 wp_register_block_template( $template_name, $args );
     468                register_block_template( $template_name, $args );
    469469
    470470                $template = get_block_template( 'block-theme//test-template' );
    … …  
    472472                $this->assertSame( 'Test Template', $template->title );
    473473
    474                 wp_unregister_block_template( $template_name );
     474                unregister_block_template( $template_name );
    475475        }
    476476
Note: See TracChangeset for help on using the changeset viewer.