Skip to content

Improve examples, introduce templates, and default to array config #569

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

Merged
merged 9 commits into from
Jun 3, 2025

Conversation

chriszarate
Copy link
Member

This reorganizes example code and updates docs to be more AI-friendly:

  1. Examples that can be run directly without any setup steps or credentials (e.g., blocks that use auth-less APIs) live in example/. They can be required by uncommenting code in remote-data-blocks.php and be ready to use immediately.
  2. Examples that require setup steps or credentials are converted to templates and live in example/templates/. These templates are heavily annotated and contain {{ Placeholders }}, making them much more AI-friendly.
  3. Documentation is generally updated to use "bare array config" instead of ::from_array() methods. This is a friendlier default and where we want our dev-ex to be.
  4. Miscellaneous documentation updates.

No code changes.

@chriszarate chriszarate requested a review from a team as a code owner June 2, 2025 23:16
@chriszarate chriszarate requested review from maxschmeling and removed request for a team June 2, 2025 23:16
Copy link
Contributor

github-actions bot commented Jun 2, 2025

Test this PR in WordPress Playground.

Copy link
Contributor

@pkevan pkevan left a comment

Choose a reason for hiding this comment

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

👍 only spotted on spelling error (I think), so committed it in 5c37f55

@chriszarate
Copy link
Member Author

👍 only spotted on spelling error (I think), so committed it in 5c37f55

@pkevan "optiona" is the Latin plural 😆 . Thanks for the fix!

@chriszarate chriszarate merged commit af9eeb9 into trunk Jun 3, 2025
13 checks passed
@chriszarate chriszarate deleted the improve/examples-to-templates branch June 3, 2025 14:32
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