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

Account for password protected posts via protected_content feature #2408

Merged
merged 11 commits into from
Dec 3, 2021
Merged

Account for password protected posts via protected_content feature #2408

merged 11 commits into from
Dec 3, 2021

Conversation

rebeccahum
Copy link
Contributor

@rebeccahum rebeccahum commented Oct 13, 2021

Description of the Change

This PR piggybacks off of the logic in #1913 - however, there were still some bugs in that PR so they should be fixed now. Added tests as well.

Benefits

Password protected posts will no longer unexpectedly show up in the front-end search, but will in the admin search.

Possible Drawbacks

None that comes to mind.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Fixed: Account for password protected posts via protected_content feature

@oscarssanchez oscarssanchez self-requested a review November 9, 2021 06:16
@oscarssanchez
Copy link
Contributor

Hi @rebeccahum ,

Thanks for submitting the PR!

I have done some preliminary testing and have this feedback:

@felipeelia felipeelia changed the base branch from develop to 4.x.x November 12, 2021 18:40
@oscarssanchez
Copy link
Contributor

Hi @rebeccahum ,

Also forgot to mention, if you don't have the bandwidth which I know sometimes is the case, just let us know and I can pick things from here, of course giving the appropriate credit.

@rebeccahum
Copy link
Contributor Author

@oscarssanchez Thanks so much for testing. I haven't had a chance yet to pick this back up — if you'd like to pick it up on my behalf, that'd be awesome!

@rebeccahum
Copy link
Contributor Author

The default WP behavior is to show the protected password posts on the frontend, but if you are logged out, you should not see those.

@oscarssanchez On a vanilla install, I'm seeing that the protected password posts are displayed (not the content) when logged in as an admin in the front-end — same with being logged out.

@oscarssanchez
Copy link
Contributor

oscarssanchez commented Nov 28, 2021

Hi @rebeccahum ,

Yes, I should have specified the testing scenario. It should go like this:

  • If I'm an admin, I see the post title displayed in the front page, and on search results.
  • If I'm a subscriber, I see the post title displayed in the front page, and on search results.
  • If I'm logged out, I see the post title displayed in the front page, but not on search results.

I think the front page does not integrate by defualt with EP, so what it displays as of now (unless it is explicitly integrated with the ep_integrate param) is WP default behavior.

@oscarssanchez oscarssanchez requested review from felipeelia and Rahmon and removed request for oscarssanchez December 2, 2021 02:27
@felipeelia felipeelia merged commit 3608190 into 10up:4.x.x Dec 3, 2021
@rebeccahum rebeccahum deleted the rebecca/feature_password-protected-posts branch December 6, 2021 16:36
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.

4 participants