- Timestamp:
- 01/29/2024 01:06:09 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-block-bindings-registry.php
r57373 r57375 11 11 12 12 /** 13 * Core class used for interacting with block binding sources.13 * Core class used for interacting with block bindings sources. 14 14 * 15 15 * @since 6.5.0 … … 21 21 * 22 22 * @since 6.5.0 23 *24 23 * @var array 25 24 */ … … 35 34 36 35 /** 37 * Registers a new block binding source.36 * Registers a new block bindings source. 38 37 * 39 38 * Sources are used to override block's original attributes with a value … … 67 66 _doing_it_wrong( 68 67 __METHOD__, 69 __( 'Block binding source name must be a string.' ),68 __( 'Block bindings source name must be a string.' ), 70 69 '6.5.0' 71 70 ); … … 76 75 _doing_it_wrong( 77 76 __METHOD__, 78 __( 'Block binding source names must not contain uppercase characters.' ),77 __( 'Block bindings source names must not contain uppercase characters.' ), 79 78 '6.5.0' 80 79 ); … … 86 85 _doing_it_wrong( 87 86 __METHOD__, 88 __( 'Block binding source names must contain a namespace prefix. Example: my-plugin/my-custom-source' ),87 __( 'Block bindings source names must contain a namespace prefix. Example: my-plugin/my-custom-source' ), 89 88 '6.5.0' 90 89 ); … … 95 94 _doing_it_wrong( 96 95 __METHOD__, 97 /* translators: %s: Block binding source name. */98 sprintf( __( 'Block binding source "%s" already registered.' ), $source_name ),96 /* translators: %s: Block bindings source name. */ 97 sprintf( __( 'Block bindings source "%s" already registered.' ), $source_name ), 99 98 '6.5.0' 100 99 ); … … 113 112 114 113 /** 115 * Unregisters a block binding source.114 * Unregisters a block bindings source. 116 115 * 117 116 * @since 6.5.0 118 117 * 119 * @param string $source_name Block binding source name including namespace.120 * @return array|false The unregistred block binding source on success and `false` otherwise.118 * @param string $source_name Block bindings source name including namespace. 119 * @return array|false The unregistred block bindings source on success and `false` otherwise. 121 120 */ 122 121 public function unregister( $source_name ) { … … 124 123 _doing_it_wrong( 125 124 __METHOD__, 126 /* translators: %s: Block binding source name. */125 /* translators: %s: Block bindings source name. */ 127 126 sprintf( __( 'Block binding "%s" not found.' ), $source_name ), 128 127 '6.5.0' … … 154 153 * 155 154 * @param string $source_name The name of the source. 156 * @return array|null The registered block binding source, or `null` if it is not registered.155 * @return array|null The registered block bindings source, or `null` if it is not registered. 157 156 */ 158 157 public function get_registered( $source_name ) { … … 165 164 166 165 /** 167 * Checks if a block binding source is registered.166 * Checks if a block bindings source is registered. 168 167 * 169 168 * @since 6.5.0 170 169 * 171 170 * @param string $source_name The name of the source. 172 * @return bool `true` if the block binding source is registered, `false` otherwise.171 * @return bool `true` if the block bindings source is registered, `false` otherwise. 173 172 */ 174 173 public function is_registered( $source_name ) {
Note: See TracChangeset
for help on using the changeset viewer.