Skip to content

Prepare for new block variations 2/3: Make event query respect ORDERBY, ORDER and 'unfinished events'#889

Merged
mauteri merged 12 commits intoGatherPress:developfrom
carstingaxion:feature/query-order-by
Oct 12, 2024
Merged

Prepare for new block variations 2/3: Make event query respect ORDERBY, ORDER and 'unfinished events'#889
mauteri merged 12 commits intoGatherPress:developfrom
carstingaxion:feature/query-order-by

Conversation

@carstingaxion
Copy link
Copy Markdown
Collaborator

@carstingaxion carstingaxion commented Sep 19, 2024

Preparation to bring some block variations from the gatherpress-block-playground into the plugin as part of #626.

Description of the Change

To be able to use the full potential of the new (but not yet included) Event Query block, this PR introduces ordering capacities to the event-query methods. On top of that it add a boolean control, to allow to include started, but unfinished, events in the actual query.

The event queries can now be ordered by:

  • id
  • title
  • last modified time
  • random
  • datetime

Closes #

How to test the Change

Changelog Entry

Added - Make event query respect ORDERBY, ORDER and 'unfinished events'

Credits

Props @carstingaxion

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@carstingaxion carstingaxion changed the title Prepare for new block variations 2/x: Make event query respect ORDERBY, ORDER and 'inclusive running events' Prepare for new block variations 2/x: Make event query respect ORDERBY, ORDER and 'unfinished events' Sep 19, 2024
@carstingaxion carstingaxion marked this pull request as ready for review September 20, 2024 23:46
@carstingaxion carstingaxion changed the title Prepare for new block variations 2/x: Make event query respect ORDERBY, ORDER and 'unfinished events' Prepare for new block variations 2/3: Make event query respect ORDERBY, ORDER and 'unfinished events' Oct 5, 2024
@mauteri mauteri changed the base branch from main to develop October 10, 2024 12:59
@github-actions
Copy link
Copy Markdown
Contributor

Preview changes with Playground

You can preview the recent changes for PR#889 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

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