Skip to content

Revise exclude_rsvp_from_comment_query in class-rsvp-query.php#1112

Merged
mauteri merged 9 commits intoGatherPress:developfrom
jmarx:bug/1109-simple
Jul 26, 2025
Merged

Revise exclude_rsvp_from_comment_query in class-rsvp-query.php#1112
mauteri merged 9 commits intoGatherPress:developfrom
jmarx:bug/1109-simple

Conversation

@jmarx
Copy link
Copy Markdown
Collaborator

@jmarx jmarx commented Jun 19, 2025

Description of the Change

This method needs revision as whilst it modifies type, type__in can also be used in the comment query (and many plugins use type__in.

Closes #1109

How to test the Change

Changelog Entry

Fixed - Bug fix

Credits

Props @jmarx @mauteri

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.

@what-the-diff
Copy link
Copy Markdown

what-the-diff bot commented Jun 19, 2025

PR Summary

  • Improvement in exclusion method
    The exclude_rsvp_from_comment_query method, located in class-rsvp-query.php file, has been enhanced to handle more scenarios correctly. Now it can operate even when comment types are not provided or when the query uses type__in.

  • Updated logic for setting comment types
    The code logic has been revamped to ensure that comment types get appropriately set in the query variables, accommodating both type and type__in usages. This ensures that our system handles various scenarios robustly.

  • Modified test case output
    The expected outcome in test case test_adjust_comments_number, within the class-test-rsvp-setup.php file, has been revised from 1 to 2. This update aligns the test case with the enhanced functionality.

@jmarx jmarx marked this pull request as ready for review June 19, 2025 20:59
@jmarx jmarx requested a review from mauteri June 19, 2025 20:59
@mauteri mauteri changed the title Bug/1109 simple Revise exclude_rsvp_from_comment_query in class-rsvp-query.php Jul 26, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Preview changes with Playground

You can preview the recent changes for PR#1112 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.

@mauteri mauteri merged commit 13ed911 into GatherPress:develop Jul 26, 2025
15 checks passed
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.

Consider revising exclude_rsvp_from_comment_query in class-rsvp-query.php

2 participants