Open
Conversation
Playwright test resultsDetails
Failed testschromium › query-presets.spec.js › Query Presets › should show query preset dropdown when presets are registered |
Implements a PHP API for registering custom query presets that can be
selected in the block editor and applied on both frontend and REST API
requests. Key features:
- register_query_preset() function for registering custom queries with
name, label, and callback
- Dynamic REST API hooks for all public post types via
rest_{$post_type}_collection_params and rest_{$post_type}_query
- Frontend query filtering via query_loop_block_query_vars
- Dropdown selector in the Query Loop block's Extra Settings panel
- Preset selection stored in query.hmPreset block attribute
Resolves #5
https://claude.ai/code/session_018FFsVSfGCZEyNTYDo8ymaq
Documents the new Query Presets feature including: - Feature overview in the Features section - Usage instructions for the dropdown selector - Developer documentation with code examples - Available PHP functions for preset management https://claude.ai/code/session_018FFsVSfGCZEyNTYDo8ymaq
- Add test mu-plugin with sample presets (alphabetical ordering) - Update .wp-env.json to mount mu-plugins folder for tests - Add query-presets.spec.js with tests for: - Preset dropdown visibility when presets are registered - Post ordering changes when selecting A-Z preset - Post ordering changes when selecting Z-A preset - Frontend query preset application https://claude.ai/code/session_018FFsVSfGCZEyNTYDo8ymaq
3a4fb5b to
51b2424
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5