Skip to content

Instantly share code, notes, and snippets.

@SirLouen
Last active January 13, 2026 17:13
Show Gist options
  • Select an option

  • Save SirLouen/75615b32f8cd8d2489c2750d7ab29889 to your computer and use it in GitHub Desktop.

Select an option

Save SirLouen/75615b32f8cd8d2489c2750d7ab29889 to your computer and use it in GitHub Desktop.
Trac Ticket 60750
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "/wp-admin/options-reading.php",
"steps": [
{
"step": "runPHP",
"code": "<?php require_once '/wordpress/wp-load.php';\n$file = '/wordpress/wp-admin/options-reading.php';\n$contents = file_get_contents($file);\n$search = \"\\tif ( get_option( 'wp_page_for_privacy_policy' ) === get_option( 'page_for_posts' ) || get_option( 'wp_page_for_privacy_policy' ) === get_option( 'page_on_front' ) ) :\\n\";\n$replace = \"\\t$privacy_policy_page = get_option( 'wp_page_for_privacy_policy' );\\n\\tif ( $privacy_policy_page && ( $privacy_policy_page === get_option( 'page_for_posts' ) || $privacy_policy_page === get_option( 'page_on_front' ) ) ) :\\n\";\n$contents = str_replace($search, $replace, $contents);\nfile_put_contents($file, $contents);\n"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment