Skip to content

Commit b337f01

Browse files
committed
Use get_block_bindings_source as public API
1 parent 2f1b107 commit b337f01

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/wp-includes/block-bindings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ function get_all_registered_block_bindings_sources() {
7575
* @param string $source_name The name of the source.
7676
* @return array|null The registered block bindings source, or `null` if it is not registered.
7777
*/
78-
function get_registered_block_bindings_source( string $source_name ) {
78+
function get_block_bindings_source( string $source_name ) {
7979
return WP_Block_Bindings_Registry::get_instance()->get_registered( $source_name );
8080
}

src/wp-includes/class-wp-block.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ private function process_block_bindings( $block_content ) {
265265
continue;
266266
}
267267

268-
$block_binding_source = get_registered_block_bindings_source( $block_binding['source'] );
268+
$block_binding_source = get_block_bindings_source( $block_binding['source'] );
269269
if ( null === $block_binding_source ) {
270270
continue;
271271
}

tests/phpunit/tests/block-bindings/register.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function tear_down() {
3838
*
3939
* @covers ::register_block_bindings_source
4040
* @covers ::get_all_registered_block_bindings_sources
41-
* @covers ::get_registered_block_bindings_source
41+
* @covers ::get_block_bindings_source
4242
*/
4343
public function test_get_all_registered() {
4444
$source_one_name = 'test/source-one';
@@ -57,8 +57,8 @@ public function test_get_all_registered() {
5757
$source_one_name => array_merge( array( 'name' => $source_one_name ), $source_one_properties ),
5858
$source_two_name => array_merge( array( 'name' => $source_two_name ), $source_two_properties ),
5959
$source_three_name => array_merge( array( 'name' => $source_three_name ), $source_three_properties ),
60-
'core/post-meta' => get_registered_block_bindings_source( 'core/post-meta' ),
61-
'core/pattern-overrides' => get_registered_block_bindings_source( 'core/pattern-overrides' ),
60+
'core/post-meta' => get_block_bindings_source( 'core/post-meta' ),
61+
'core/pattern-overrides' => get_block_bindings_source( 'core/pattern-overrides' ),
6262
);
6363

6464
$registered = get_all_registered_block_bindings_sources();

0 commit comments

Comments
 (0)