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

[N/A] ACF Blocks Toolkit Changes from Block Forms branch #139

Merged
merged 3 commits into from
Jul 31, 2024

Conversation

bd-viget
Copy link
Contributor

Summary

This PR contains changes made to the ACF Blocks Toolkit plugin during the development of ACF Form Blocks plugin.

Summary of Changes

  • Adds support for Unique Persistent Block IDs
  • Slight refactor of block_attrs() to be cleaner and more consistent
  • Allows block templates (inner blocks) to be specified in the block.json file under the "acf" object, accessible from $block['template'].
  • Provides additional helpful variables to the render.php (and render.twig), as well as renames attributes to block to be more consistent with the PHP template.
    • int $post_id
    • WP_Block $wp_block
    • array|bool $context (usually array)
    • bool $is_ajax_render

Issues

  • N/A

@bd-viget bd-viget self-assigned this Jul 31, 2024
Copy link
Contributor

@nathan-schmidt-viget nathan-schmidt-viget left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! A lot of nice "quality of code" improvements!

} %}
{% endif %}
<section
{{ block_attrs( attributes, 'gap-24 lg:gap-48', attrs ) }}
{{ block_attrs( block, 'gap-24 lg:gap-48', attrs ) }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that the php and twig will both use block!

@bd-viget bd-viget merged commit c710c3c into main Jul 31, 2024
@bd-viget bd-viget deleted the bd/acf-bt-updates branch July 31, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants