Skip to content

56694 Reset wp_page_for_privacy_policy when the page is trashed - #11520

Closed
nimesh-xecurify wants to merge 2 commits into
WordPress:trunkfrom
nimesh-xecurify:56694-uncached-db-read
Closed

56694 Reset wp_page_for_privacy_policy when the page is trashed#11520
nimesh-xecurify wants to merge 2 commits into
WordPress:trunkfrom
nimesh-xecurify:56694-uncached-db-read

Conversation

@nimesh-xecurify

Copy link
Copy Markdown

Fixed tests for #11443
Original author : @masteradhoc

Trac ticket: https://core.trac.wordpress.org/ticket/56694

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props nimeshatxecurify.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@westonruter

Copy link
Copy Markdown
Member

Closing since tests have been moved to #11443.

pento pushed a commit that referenced this pull request Jul 24, 2026
If the privacy page is deleted but the setting is left intact, an admin_hook would fire on every admin screen attempting to notify about changes in the privacy policy. With the page deleted, this database read is never cached, since it returns no results.
Add a `before_delete_post` hook to reset setting if the post is deleted. Add a guard to reset the option on the privacy screen to cover edge cases. Developed in #11443, #11520
Props johnjamesjacoby, masteradhoc, westonruter, nimeshatxecurify, mukesh27, joedolson.
Fixes #56694.
git-svn-id: https://develop.svn.wordpress.org/trunk@62845 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Jul 24, 2026
If the privacy page is deleted but the setting is left intact, an admin_hook would fire on every admin screen attempting to notify about changes in the privacy policy. With the page deleted, this database read is never cached, since it returns no results.
Add a `before_delete_post` hook to reset setting if the post is deleted. Add a guard to reset the option on the privacy screen to cover edge cases. Developed in WordPress/wordpress-develop#11443, WordPress/wordpress-develop#11520
Props johnjamesjacoby, masteradhoc, westonruter, nimeshatxecurify, mukesh27, joedolson.
Fixes #56694.
Built from https://develop.svn.wordpress.org/trunk@62845
git-svn-id: http://core.svn.wordpress.org/trunk@62125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@nimesh-xecurify@westonruter