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

Better match the behaviour of Advanced Post Cache to WP_Query when setting found_posts #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aidvu
Copy link

@aidvu aidvu commented Dec 4, 2020

advance_post_cache was making the following choice in post_limits_request and posts_request:

  • If the $limits part of the query is empty or no_found_rows is set return a count of 0.

We should split this, and return NO_FOUND_ROWS when no_found_rows is set, and return NO_LIMIT when there is no $limit clause, so the post count can be calculated correctly.

Also pulled in some code improvements.

@aidvu aidvu added the bug label Dec 4, 2020
@aidvu aidvu requested a review from westi December 4, 2020 18:11
@aidvu aidvu self-assigned this Dec 4, 2020
@r-a-y
Copy link

r-a-y commented Feb 25, 2021

Related: #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants