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

Make Max Number of Posts Filterable #114

Closed
kevinfodness opened this issue Dec 20, 2023 · 0 comments · Fixed by #205
Closed

Make Max Number of Posts Filterable #114

kevinfodness opened this issue Dec 20, 2023 · 0 comments · Fixed by #205
Assignees
Labels
enhancement New feature or request gutenberg Requires understanding Gutenberg php Requires understanding PHP typescript Requires understanding TypeScript

Comments

@kevinfodness
Copy link
Member

Description

The maximum number of posts is hardcoded to 10, but should be filterable. It's used in Gutenberg here to set the upper bound of the range control: https://github.com/alleyinteractive/wp-curate/blob/develop/blocks/query/edit.tsx#L293

Use Case

As a developer, I want to be able to modify the max number of posts that is available in the range control in a Query block.

Acceptance Criteria

  • Add a filter in PHP to set the max number of posts for the query block. Default it to 10.
  • Use wp_localize_script to make this value available to the editor script for the block.
  • If this value is set, have the edit component for the block use it instead of the default that comes in from attributes.
@kevinfodness kevinfodness added enhancement New feature or request php Requires understanding PHP gutenberg Requires understanding Gutenberg typescript Requires understanding TypeScript labels Dec 20, 2023
@willowCeleste willowCeleste self-assigned this Apr 24, 2024
@willowCeleste willowCeleste self-assigned this Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gutenberg Requires understanding Gutenberg php Requires understanding PHP typescript Requires understanding TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants