Changeset 58395
- Timestamp:
- 06/12/2024 12:42:28 PM (3 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-bindings.php
r58075 r58395 76 76 * The array of arguments that are used to register a source. 77 77 * 78 * @type string $label 79 * @type callable $get_value_callback 80 * 78 * @type string $label The label of the source. 79 * @type callable $get_value_callback A callback executed when the source is processed during block rendering. 80 * The callback should have the following signature: 81 81 * 82 * `function ($source_args, $block_instance,$attribute_name): mixed`83 * 84 * 85 * 86 * 87 * - @param string $attribute_name The name of an attribute.88 * 89 * 90 * @type string[] $uses_context (optional)Array of values to add to block `uses_context` needed by the source.82 * `function( $source_args, $block_instance, $attribute_name ): mixed` 83 * - @param array $source_args Array containing source arguments 84 * used to look up the override value, 85 * i.e. {"key": "foo"}. 86 * - @param WP_Block $block_instance The block instance. 87 * - @param string $attribute_name The name of an attribute. 88 * The callback has a mixed return type; it may return a string to override 89 * the block's original value, null, false to remove an attribute, etc. 90 * @type string[] $uses_context Optional. Array of values to add to block `uses_context` needed by the source. 91 91 * } 92 92 * @return WP_Block_Bindings_Source|false Source when the registration was successful, or `false` on failure. -
trunk/src/wp-includes/class-wp-block-bindings-registry.php
r58075 r58395 73 73 * @since 6.5.0 74 74 * 75 * @param string 76 * 77 * 78 * @param array 75 * @param string $source_name The name of the source. It must be a string containing a namespace prefix, i.e. 76 * `my-plugin/my-custom-source`. It must only contain lowercase alphanumeric 77 * characters, the forward slash `/` and dashes. 78 * @param array $source_properties { 79 79 * The array of arguments that are used to register a source. 80 80 * 81 * @type string $label 82 * @type callable $get_value_callback 83 * 84 * 85 * `function ($source_args, $block_instance,$attribute_name): mixed`86 * 87 * 88 * 89 * 90 * 91 * 92 * 93 * @type string[] $uses_context (optional)Array of values to add to block `uses_context` needed by the source.81 * @type string $label The label of the source. 82 * @type callable $get_value_callback A callback executed when the source is processed during block rendering. 83 * The callback should have the following signature: 84 * 85 * `function( $source_args, $block_instance, $attribute_name ): mixed` 86 * - @param array $source_args Array containing source arguments 87 * used to look up the override value, 88 * i.e. {"key": "foo"}. 89 * - @param WP_Block $block_instance The block instance. 90 * - @param string $attribute_name The name of the target attribute. 91 * The callback has a mixed return type; it may return a string to override 92 * the block's original value, null, false to remove an attribute, etc. 93 * @type string[] $uses_context Optional. Array of values to add to block `uses_context` needed by the source. 94 94 * } 95 95 * @return WP_Block_Bindings_Source|false Source when the registration was successful, or `false` on failure.
Note: See TracChangeset
for help on using the changeset viewer.