From 2a6bf13aa356e4e6263ce4e3d251c587e5b4764e Mon Sep 17 00:00:00 2001 From: Carlos Bravo <37012961+cbravobernal@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:43:08 +0100 Subject: [PATCH] Add comments --- docs/reference-guides/block-api/block-bindings.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/reference-guides/block-api/block-bindings.md b/docs/reference-guides/block-api/block-bindings.md index 2d3295408fa0b..53d76c068224b 100644 --- a/docs/reference-guides/block-api/block-bindings.md +++ b/docs/reference-guides/block-api/block-bindings.md @@ -149,7 +149,6 @@ The function to register a custom source is `registerBlockBindingsSource( args ) The `label` argument will override the one defined on the server if they are different. - This example will show a custom post meta date in the editor and, if it doesn't exist, it will show today's date. The user can edit the value of the date. (Caution: This example does not format the user input as a dateā€”it's only for educational purposes.) ```js @@ -161,8 +160,8 @@ import { store as coreDataStore } from '@wordpress/core-data'; registerBlockBindingsSource( { name: 'wpmovies/visualization-date', - label: __( 'Visualization Date', 'custom-bindings' ), - usesContext: [ 'postId', 'postType' ], + label: __( 'Visualization Date', 'custom-bindings' ), // We can skip the label, as it was already defined in the server in the previous example. + usesContext: [ 'postType' ], // We can skip postId, as it was already defined in the server in the previous example. getValues( { select, context } ) { let wpMoviesVisualizationDate; const { getEditedEntityRecord } = select( coreDataStore );