Repository navigation
Fix CS check failing on VIPCS 3.1 for the zone query - #164
Merged
Merged
Conversation
VIPCS 3.1.0 now flags posts_per_page set to -1, so the CS check fails on every pull request. get_zone_query() has asked for every post in a zone since the plugin's first release, and the template tags built on it (z_get_posts_in_zone() and friends) rely on that. Zones are curated by hand and stay small, and callers can still pass their own limit, so the query is safe to leave unbounded. Capping it would silently drop posts from larger zones on themes that expect the full list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VIPCS 3.1.0 (released 27 July 2026) extended
WordPressVIPMinimum.Performance.NoPagingto flagposts_per_pageset to-1(VIPCS #882). The repo has nocomposer.lock, so CI picked up the new release and the CS check now fails on every pull request, including #163.The only hit is the default in
Zoninator::get_zone_query(), which has requested every post in a zone since the plugin's first release. The public template tags (z_get_posts_in_zone(),z_get_zone_query()and others) depend on that behaviour, and themes rendering a zone expect the full list in its curated order. Zones are hand-curated and small, and callers can already pass their ownposts_per_page, so this adds a justifiedphpcs:ignorerather than imposing a cap that would silently drop posts from larger zones.Once this is merged, #163 should pass after it is updated from
develop.