| 开发者 | service2client |
|---|---|
| 更新时间 | 2026年8月18日 23:35 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.0 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp-content/fatal-error-handler.php, which core loads earlier than any plugin — that is what lets Pug see a fatal that happens before normal plugins have even loaded. It subclasses core's handler and then hands control straight back to WordPress, so Recovery Mode and the recovery email keep working exactly as they do without Pug. Deactivating the plugin removes the drop-in and stops capture; deleting the plugin removes everything.
What Pug does not do
error-sniffing-pug folder to /wp-content/plugins/, or install the ZIP through Plugins → Add New → Upload.wp-content/fatal-error-handler.php.wp-content to be writable so it can install its drop-in. If it can't, it will tell you in the admin and fall back to WordPress' default behavior.No. Pug does its work on the admin side and on the error path only. On a normal page load it does almost nothing; the diagnosis, help links, and reports are all generated when you open a crash report, not on every request.
fatal-error-handler.php is Pug's capture drop-in, installed on activation. It is a standard WordPress drop-in location — the only path from which core will load a custom fatal handler. Pug installs, updates, and removes it for you, and will never overwrite one that belongs to another plugin.
Only one fatal-error-handler.php can exist. If another plugin got there first, Pug will not overwrite it, and Pug's capture will not run. Pug tells you this in the admin so you can decide which one to keep.
Pug supports PHP 7.0 and newer. On PHP older than 7.0 it deactivates its own code quietly rather than causing errors.
No. Diagnosis is done locally. The bug report for a plugin author is copy-and-paste — you send it, Pug doesn't. The notification email goes only to the address you configure, through your own site's mail.
Two ways, both private to you: point Pug at a notification email and it writes to you shortly after a fatal is captured, and the next time you open wp-admin Pug shows a dismissible notice linking to the report. Nothing is ever shown to your visitors.
php-error.php drop-in). You now learn about a captured fatal through the crash-notification email and a new dismissible admin notice that links to the report.wp_upload_dir() (protected from direct access) instead of a folder in wp-content.esniff prefix; the admin script is enqueued through the standard API; local file reads go through WP_Filesystem; theme paths resolve via get_theme_root().php-error.php drop-in only while enabled.{plugins} token to weave plugin names into your message inline.