Skip to content

fix(access-control): bump content rule suggestion limit to 100#4669

Open
dkoo wants to merge 2 commits intotrunkfrom
fix/content-rule-suggestions-limit
Open

fix(access-control): bump content rule suggestion limit to 100#4669
dkoo wants to merge 2 commits intotrunkfrom
fix/content-rule-suggestions-limit

Conversation

@dkoo
Copy link
Copy Markdown
Contributor

@dkoo dkoo commented Apr 16, 2026

All Submissions:

Changes proposed in this Pull Request:

Fixes a bug that causes the UI for managing taxonomy-based content rules to show a maximum of 10 saved tokens.

Closes NPPD-1459.

How to test the changes in this Pull Request:

  1. With define( 'NEWSPACK_CONTENT_GATES', true ); defined in wp-config.php, create or edit a content gate.
  2. Select "Choose specific content", enable the Categories rule, and attempt to add more than 10 category terms without saving in between.
  3. On trunk, observe that as you add more than 10, the UI starts to drop display of some terms you added previously.
  4. Save the gate.
  5. In the Content Gates list view, observe that on trunk the Content Rules summary also only shows a max of 10 terms.
  6. Check out this branch, repeat steps 2-5, and confirm that you're able to add up to 100 terms and see them represented visually in both UIs.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo self-assigned this Apr 16, 2026
@dkoo dkoo requested a review from a team as a code owner April 16, 2026 16:48
Copilot AI review requested due to automatic review settings April 16, 2026 16:48
@dkoo dkoo added the [Status] Needs Review The issue or pull request needs to be reviewed label Apr 16, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the Content Gates “specific content” taxonomy token field query to allow showing/selecting more than the REST API default of 10 terms, so editors can manage larger taxonomy-based rules.

Changes:

  • Increased the REST API per_page parameter for taxonomy suggestion fetching from 10 to 100 in the content rule token field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Review The issue or pull request needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants