-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adds filter to control max number of posts in query block #205
Conversation
….com/alleyinteractive/wp-curate into feature/TECH-93/filterable-max-posts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code is 💯.
One outstanding question on this though, that I can't answer but maybe @mogmarsh can: by removing the attribute we eliminate the opportunity to add a UI control for this value. Is that OK? Is that something that would be valuable?
Co-authored-by: Greg Marshall <[email protected]>
@mboynes @willowCeleste For instance, the developer could say "you can have between 3 and 5 posts in this particular location", which gives the end user some flexibility, but not full control. If the minimum and maximum are set to the same number, the end user does not get any control, the range selector is not displayed. I wonder if maybe we can leave support for |
imo I'd rather not have the "invisible setting" and go with a sitewide max, and allow flexibility in use of the blocks. |
This adds a filter that allows a dev to control the max number of posts allowed in the query block. I removed the old hardcoded attribute
maxNumberOfPosts
and replaced it with a new value which is passed into the block viawp_localize_script
.Fixes #114