Changeset 57526 for trunk/src/wp-includes/block-bindings.php
- Timestamp:
- 02/02/2024 08:22:11 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-bindings.php
r57514 r57526 20 20 * @since 6.5.0 21 21 * 22 * @param string 23 * 24 * 25 * @param array 22 * @param string $source_name The name of the source. It must be a string containing a namespace prefix, i.e. 23 * `my-plugin/my-custom-source`. It must only contain lowercase alphanumeric 24 * characters, the forward slash `/` and dashes. 25 * @param array $source_properties { 26 26 * The array of arguments that are used to register a source. 27 27 * … … 41 41 * @return array|false Source when the registration was successful, or `false` on failure. 42 42 */ 43 function register_block_bindings_source( $source_name, array $source_properties ) {43 function register_block_bindings_source( string $source_name, array $source_properties ) { 44 44 return WP_Block_Bindings_Registry::get_instance()->register( $source_name, $source_properties ); 45 45 } … … 53 53 * @return array|false The unregistered block bindings source on success and `false` otherwise. 54 54 */ 55 function unregister_block_bindings_source( $source_name ) {55 function unregister_block_bindings_source( string $source_name ) { 56 56 return WP_Block_Bindings_Registry::get_instance()->unregister( $source_name ); 57 57 } … … 67 67 return WP_Block_Bindings_Registry::get_instance()->get_all_registered(); 68 68 } 69 70 /** 71 * Retrieves a registered block bindings source. 72 * 73 * @since 6.5.0 74 * 75 * @param string $source_name The name of the source. 76 * @return array|null The registered block bindings source, or `null` if it is not registered. 77 */ 78 function get_block_bindings_source( string $source_name ) { 79 return WP_Block_Bindings_Registry::get_instance()->get_registered( $source_name ); 80 }
Note: See TracChangeset
for help on using the changeset viewer.