Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing semicolon in register_block_bindings_source code example #1579

Open
bacoords opened this issue Jun 7, 2024 · 5 comments
Open

Missing semicolon in register_block_bindings_source code example #1579

bacoords opened this issue Jun 7, 2024 · 5 comments
Assignees
Labels
developer documentation (DevHub) Improvements or additions to developer documentation self-assigned [Status] Review Issue in review [Status] To do Issue marked as Todo

Comments

@bacoords
Copy link

bacoords commented Jun 7, 2024

Issue Description

Missing semicolon in register_block_bindings_source code example

URL of the Page with the Issue

https://developer.wordpress.org/reference/functions/register_block_bindings_source/#registering-a-source

Section of Page with the issue

"Registering a source" the line return "The value passed to the block is: $value" is missing a semicolon.

@bacoords bacoords added the [Status] To do Issue marked as Todo label Jun 7, 2024
Copy link

github-actions bot commented Jun 7, 2024

Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.

@Leonardus-Nugraha Leonardus-Nugraha added the developer documentation (DevHub) Improvements or additions to developer documentation label Jul 16, 2024
@benazeer-ben
Copy link

/assign

Copy link

Hey @benazeer-ben, thanks for your interest in this issue! 🍪🍪🍪
If you have any questions, do not hesitate to ask them in our #docs Slack channel.
Enjoy and happy contributing ❤️

@benazeer-ben
Copy link

Here is the updated code:

function my_plugin_get_custom_source_value( array $source_args, $block_instance, string $attribute_name ) {
  // Your custom logic to get the value from the source.
  // For example, you can use the `$source_args` to look up a value in a custom table or get it from an external API.
  $value = $source_args['key'];

  return "The value passed to the block is: $value";
}

@karthick-murugan karthick-murugan added the [Status] Review Issue in review label Feb 12, 2025
Copy link

Heads up @docs-reviewers - the "[Status] Review" label was applied to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer documentation (DevHub) Improvements or additions to developer documentation self-assigned [Status] Review Issue in review [Status] To do Issue marked as Todo
Projects
None yet
Development

No branches or pull requests

4 participants