Skip to content

Commit

Permalink
Remove the default 'wp_maybe_grant_site_health_caps' filter. (WordPre…
Browse files Browse the repository at this point in the history
  • Loading branch information
dd32 authored Oct 14, 2022
1 parent 294dcb3 commit 456f63a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dist-web/wasm-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,16 @@
"
);
// DISABLE SITE HEALTH:
file_put_contents(
'${this.DOCROOT}/wp-includes/default-filters.php',
preg_replace(
'!add_filter[^;]+wp_maybe_grant_site_health_caps[^;]+;!i',
'',
file_get_contents('${this.DOCROOT}/wp-includes/default-filters.php')
)
);
// WORKAROUND:
// The fsockopen transport erroneously reports itself as a working transport. Let's force
// it to report it won't work.
Expand Down
10 changes: 10 additions & 0 deletions src/shared/wordpress.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ export default class WordPress {
.'add_filter( "option_siteurl", function($url) { return getenv("HOST") ?: file_get_contents(__DIR__."/../.absolute-url"); }, 10000 );' . "\n"
);
// DISABLE SITE HEALTH:
file_put_contents(
'${this.DOCROOT}/wp-includes/default-filters.php',
preg_replace(
'!add_filter[^;]+wp_maybe_grant_site_health_caps[^;]+;!i',
'',
file_get_contents('${this.DOCROOT}/wp-includes/default-filters.php')
)
);
// WORKAROUND:
// The fsockopen transport erroneously reports itself as a working transport. Let's force
// it to report it won't work.
Expand Down

0 comments on commit 456f63a

Please sign in to comment.