Skip to content

Member Content: Exclude Restricted Content Matches from Search Results - #1275

Merged
n7studios merged 5 commits into
member-content-attachmentsfrom
member-content-search
Nov 10, 2026
Merged

n7studios merged 5 commits into
member-content-attachmentsfrom
member-content-search

Conversation

@n7studios

Copy link
Copy Markdown
Contributor

Summary

Exclude Posts restricted by Member Content from search results (frontend and REST API) when the search only matches their restricted content, so searches can't be used to discover it. Posts are still returned when the search matches their title, excerpt or content preview, and search results only display the content preview.

Testing

  • testRESTAPISearchExcludesRestrictedContentMatches: Test a search matching only restricted content returns no results, including the total count.
  • testRESTAPISearchIncludesRestrictedContentPreviewMatches: Test a search matching the content preview returns the Post, without its restricted content.
  • testRESTAPISearchIncludesRestrictedContentMatchesForEditor: Test a search matching restricted content returns the Post for users who can edit it.
  • testSearchResultsRestricted: Test frontend search results exclude restricted content matches, and only display the content preview.

Checklist

@n7studios n7studios added this to the 3.5.0 milestone Nov 4, 2026
@n7studios n7studios self-assigned this Nov 4, 2026
@n7studios n7studios modified the milestones: 3.5.0, 3.5.1 Nov 5, 2026
@n7studios
n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team November 9, 2026 11:10
@n7studios
n7studios marked this pull request as ready for review November 9, 2026 11:10
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios
n7studios merged commit 20e99b4 into member-content-attachments Nov 10, 2026
365 of 383 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants