Plugin Directory

Changeset 3304125


Ignore:
Timestamp:
06/01/2025 03:28:14 AM (10 months ago)
Author:
rudlinkon
Message:

Update to version 1.1.0 from GitHub

Location:
fatal-plugin-auto-deactivator
Files:
6 added
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • fatal-plugin-auto-deactivator/tags/1.1.0/fatal-plugin-auto-deactivator.php

    r3300057 r3304125  
    44 * Plugin URI: https://wordpress.org/plugins/fatal-plugin-auto-deactivator/
    55 * Description: Automatically deactivates plugins that cause fatal errors to prevent site crashes.
    6  * Version: 1.0.1
     6 * Version: 1.1.0
    77 * Author: Linkon Miyan
    88 * Author URI: https://profiles.wordpress.org/rudlinkon/
     
    1111 * Text Domain: fatal-plugin-auto-deactivator
    1212 * Domain Path: /languages
    13  * Requires at least: 5.2
     13 * Requires at least: 5.3
    1414 * Requires PHP: 7.0
    1515 * Tested up to: 6.8
     
    2323// Define plugin constants
    2424if ( ! defined( 'FPAD_VERSION' ) ) {
    25     define( 'FPAD_VERSION', '1.0.1' );
     25    define( 'FPAD_VERSION', '1.1.0' );
    2626}
    2727
     
    3535
    3636/**
    37  * Load plugin text domain for translations
    38  */
    39 function fpad_load_textdomain() {
    40     load_plugin_textdomain( 'fatal-plugin-auto-deactivator', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
    41 }
    42 
    43 add_action( 'plugins_loaded', 'fpad_load_textdomain' );
    44 
    45 /**
    4637 * Include required files
    4738 */
    4839require_once FPAD_PLUGIN_DIR . 'includes/class-fatal-error-handler.php';
    4940require_once FPAD_PLUGIN_DIR . 'includes/class-dropin-manager.php';
     41require_once FPAD_PLUGIN_DIR . 'includes/class-admin.php';
     42require_once FPAD_PLUGIN_DIR . 'includes/class-plugin-lifecycle.php';
     43require_once FPAD_PLUGIN_DIR . 'includes/class-utils.php';
    5044
    5145/**
    52  * Plugin activation hook
     46 * Initialize plugin classes
    5347 */
    54 function fpad_activate() {
    55     // Install the drop-in
    56     $dropin_manager = new FPAD_Dropin_Manager();
    57     $dropin_manager->install_dropin();
    58 }
    59 
    60 register_activation_hook( __FILE__, 'fpad_activate' );
     48FPAD_Utils::init();
     49FPAD_Admin::init();
     50FPAD_Plugin_Lifecycle::init();
    6151
    6252/**
    63  * Plugin deactivation hook
     53 * Register plugin hooks
    6454 */
    65 function fpad_deactivate() {
    66     // Remove the drop-in
    67     $dropin_manager = new FPAD_Dropin_Manager();
    68     $dropin_manager->remove_dropin();
    69 }
    70 
    71 register_deactivation_hook( __FILE__, 'fpad_deactivate' );
    72 
    73 /**
    74  * Check if the drop-in is installed and working
    75  */
    76 function fpad_check_dropin() {
    77     $dropin_manager = new FPAD_Dropin_Manager();
    78 
    79     // If the drop-in is not installed, try to install it
    80     if ( ! $dropin_manager->is_dropin_installed() ) {
    81         $dropin_manager->install_dropin();
    82     }
    83 }
    84 
    85 add_action( 'admin_init', 'fpad_check_dropin' );
    86 
    87 /**
    88  * Display admin notice for deactivated plugins
    89  */
    90 function fpad_admin_notices() {
    91     if ( ! current_user_can( 'activate_plugins' ) ) {
    92         return;
    93     }
    94 
    95     $deactivated_plugins = get_option( 'fpad_deactivated_plugins', [] );
    96 
    97     if ( empty( $deactivated_plugins ) ) {
    98         return;
    99     }
    100 
    101     foreach ( $deactivated_plugins as $key => $plugin_data ) {
    102         $plugin_file     = $plugin_data['plugin'];
    103         $plugin_data_obj = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_file );
    104         $plugin_name     = $plugin_data_obj['Name'] ?: $plugin_file;
    105         $error_message   = $plugin_data['error']['message'];
    106 
    107         echo '<div class="notice notice-error is-dismissible">';
    108         echo '<p>' . sprintf(
    109             /* translators: 1: Plugin name, 2: Error message */
    110                 esc_html__( 'Fatal Plugin Auto Deactivator has deactivated "%1$s" due to a fatal error: %2$s', 'fatal-plugin-auto-deactivator' ),
    111                 '<strong>' . esc_html( $plugin_name ) . '</strong>',
    112                 esc_html( $error_message )
    113             ) . '</p>';
    114         echo '</div>';
    115     }
    116 
    117     // Clear the notices after displaying them
    118     update_option( 'fpad_deactivated_plugins', [] );
    119 }
    120 
    121 add_action( 'admin_notices', 'fpad_admin_notices' );
    122 
    123 /**
    124  * Register uninstall hook
    125  */
    126 register_uninstall_hook( __FILE__, 'fpad_uninstall' );
    127 
    128 /**
    129  * Clean up plugin data on uninstall
    130  */
    131 function fpad_uninstall() {
    132     // Remove the drop-in
    133     $dropin_manager = new FPAD_Dropin_Manager();
    134     $dropin_manager->remove_dropin();
    135 
    136     // Delete plugin options
    137     delete_option( 'fpad_deactivated_plugins' );
    138     delete_option( 'fpad_deactivation_log' );
    139 }
     55register_activation_hook( __FILE__, array( 'FPAD_Plugin_Lifecycle', 'activate' ) );
     56register_deactivation_hook( __FILE__, array( 'FPAD_Plugin_Lifecycle', 'deactivate' ) );
     57register_uninstall_hook( __FILE__, array( 'FPAD_Plugin_Lifecycle', 'uninstall' ) );
  • fatal-plugin-auto-deactivator/tags/1.1.0/includes/class-fatal-error-handler.php

    r3300057 r3304125  
    332332                    margin: 0;
    333333                    word-break: break-word;
     334                    white-space: pre-wrap;
    334335                }
    335336                .fpad_error_location {
  • fatal-plugin-auto-deactivator/tags/1.1.0/languages/fatal-plugin-auto-deactivator.pot

    r3300057 r3304125  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Fatal Plugin Auto Deactivator 1.0.0\n"
     5"Project-Id-Version: Fatal Plugin Auto Deactivator 1.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/fatal-plugin-auto-deactivator\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-05-24T19:00:51+00:00\n"
     12"POT-Creation-Date: 2025-05-31T22:02:00+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
     
    4141
    4242#. translators: 1: Plugin name, 2: Error message
    43 #: fatal-plugin-auto-deactivator.php:110
     43#: includes/class-admin.php:52
    4444msgid "Fatal Plugin Auto Deactivator has deactivated \"%1$s\" due to a fatal error: %2$s"
    4545msgstr ""
     46
     47#: includes/class-admin.php:69
     48#: includes/class-admin.php:121
     49msgid "Fatal Plugin Auto Deactivator Log"
     50msgstr ""
     51
     52#: includes/class-admin.php:70
     53msgid "Fatal Plugin Log"
     54msgstr ""
     55
     56#: includes/class-admin.php:92
     57msgid "View Log"
     58msgstr ""
     59
     60#: includes/class-admin.php:113
     61msgid "Fatal Plugin Auto Deactivator log cleared successfully."
     62msgstr ""
     63
     64#: includes/class-admin.php:129
     65msgid "Clear Log"
     66msgstr ""
     67
     68#: includes/class-admin.php:134
     69msgid "No plugin deactivations have been logged yet."
     70msgstr ""
     71
     72#: includes/class-admin.php:171
     73msgid "Date"
     74msgstr ""
     75
     76#: includes/class-admin.php:172
     77msgid "Plugin"
     78msgstr ""
     79
     80#: includes/class-admin.php:173
     81msgid "File"
     82msgstr ""
  • fatal-plugin-auto-deactivator/tags/1.1.0/readme.txt

    r3300057 r3304125  
    22Contributors: rudlinkon
    33Tags: fatal error, plugin deactivation, error handling, site protection, crash prevention
    4 Requires at least: 5.2
     4Requires at least: 5.3
    55Tested up to: 6.8
    6 Stable tag: 1.0.1
     6Stable tag: 1.1.0
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    1717### Key Features
    1818
    19 * **Automatic Error Detection**: Monitors for fatal PHP errors in real-time
    20 * **Smart Plugin Identification**: Identifies which plugin is causing the fatal error
    21 * **Instant Deactivation**: Automatically deactivates the problematic plugin
     19* **Automatic Error Detection**: Monitors for fatal PHP errors in real-time using WordPress drop-in technology
     20* **Smart Plugin Identification**: Identifies which plugin is causing the fatal error through stack trace analysis
     21* **Instant Deactivation**: Automatically deactivates the problematic plugin during the shutdown phase
    2222* **Detailed Admin Notifications**: Provides clear notifications about which plugin was deactivated and why
    23 * **Error Logging**: Records detailed information about the error for troubleshooting
     23* **Persistent Error Logging**: Records detailed information about errors in a permanent log for troubleshooting
     24* **Error Log Management Page**: Dedicated admin page to view, manage, and clear error logs with detailed history
    2425* **Zero Configuration**: Works right out of the box with no setup required
    2526* **Custom Error Page**: Displays a user-friendly error page with a reload button instead of the white screen of death
     27* **Debug-Aware Display**: Shows detailed error information only when WP_DEBUG_DISPLAY is enabled for security
     28* **Drop-in Management**: Automatically installs and manages WordPress fatal-error-handler.php drop-in
    2629
    2730### How It Works
    2831
    29 When a fatal error occurs on your WordPress site, this plugin:
     32This plugin uses WordPress's built-in drop-in system to provide the most reliable error handling possible. When activated, it:
    3033
    31 1. Captures the error details during the shutdown phase
    32 2. Identifies which plugin is responsible for the error
    33 3. Automatically deactivates only that specific plugin
    34 4. Logs the action for reference
    35 5. Displays an admin notice with details when you next log in
    36 6. Shows a user-friendly error page to visitors instead of the white screen of death
     341. **Installs a Drop-in**: Creates a `fatal-error-handler.php` file in your wp-content directory
     352. **Monitors for Errors**: WordPress automatically uses this drop-in when fatal errors occur
     363. **Captures Error Details**: Records the error message, file, and line number during the shutdown phase
     374. **Identifies the Plugin**: Analyzes the error stack trace to determine which plugin caused the issue
     385. **Deactivates Safely**: Automatically deactivates only the problematic plugin
     396. **Logs Everything**: Stores detailed error information in a permanent log for troubleshooting
     407. **Notifies Admins**: Displays clear admin notices with error details when you next log in
     418. **Shows User-Friendly Pages**: Displays a custom error page with reload button instead of the white screen of death
    3742
    38 This prevents the dreaded "white screen of death" and keeps your site operational while you address the underlying issue.
     43The drop-in approach ensures maximum reliability since it operates at the WordPress core level, even when other plugins fail.
    3944
    4045### Use Cases
     
    53581. Upload the `fatal-plugin-auto-deactivator` folder to the `/wp-content/plugins/` directory
    54592. Activate the plugin through the 'Plugins' menu in WordPress
    55 3. That's it! The plugin works automatically with no configuration needed
     603. The plugin will automatically install the required drop-in file (`fatal-error-handler.php`) in your wp-content directory
     614. That's it! The plugin works automatically with no configuration needed
     62
     63**Note**: The plugin requires write permissions to your wp-content directory to install the drop-in file. If activation fails, check your file permissions.
    5664
    5765== Frequently Asked Questions ==
     
    8997This plugin specifically targets fatal PHP errors that would normally make your site inaccessible. It doesn't handle warnings, notices, or other non-fatal errors.
    9098
     99= What is a drop-in and why does this plugin use one? =
     100
     101A drop-in is a special type of WordPress file that replaces core functionality. This plugin uses the `fatal-error-handler.php` drop-in to ensure it can handle errors even when other plugins fail. The drop-in is automatically installed when you activate the plugin and removed when you deactivate it.
     102
     103= Will the drop-in conflict with other plugins? =
     104
     105No, the drop-in is specifically designed for fatal error handling and won't conflict with other plugins. If another plugin tries to install its own fatal error handler drop-in, this plugin will detect it and avoid overwriting it.
     106
     107= Why do I see detailed error information sometimes but not others? =
     108
     109For security reasons, detailed error information (file paths, line numbers, error messages) is only displayed when WP_DEBUG_DISPLAY is enabled in your WordPress configuration. When disabled, visitors see a generic error message while administrators still receive detailed notifications in the dashboard.
     110
     111= Where are the error logs stored? =
     112
     113Error logs are stored in your WordPress database as options. The plugin maintains both temporary logs (for admin notifications) and permanent logs (for troubleshooting history). You can view these through your WordPress admin dashboard.
     114
    91115== Screenshots ==
    92116
     
    97121
    98122== Changelog ==
     123
     124= 1.1.0 - 01/06/2025 =
     125- Added: New "Fatal Plugin Log" admin subpage under Tools for comprehensive error management
     126- Added: Detailed log table showing date, time, plugin, file, line number, and error message
     127- Added: "Clear Log" functionality with nonce protection
     128- Added: "View Log" action link on plugin list for quick access
     129- Added: Enhanced error type detection (Fatal, Parse, Core, etc.)
     130- Added: Security checks during drop-in file install and management
     131- Improved: Validation, sanitization, and formatting of error messages with monospace font
     132- Improved: UI styling using WordPress admin standards and alternating row colors
     133- Improved: Codebase optimized for better performance
     134- Few minor bug fixes & improvements
    99135
    100136= 1.0.1 - 25/05/2025 =
     
    107143== Upgrade Notice ==
    108144
    109 = 1.0.1 =
    110 We have improved security and fixed few bugs. Please update to the latest version.
     145= 1.1.0 =
     146We have added a dedicated admin subpage for viewing and managing error logs. Please update to the latest version.
  • fatal-plugin-auto-deactivator/trunk/fatal-plugin-auto-deactivator.php

    r3300057 r3304125  
    44 * Plugin URI: https://wordpress.org/plugins/fatal-plugin-auto-deactivator/
    55 * Description: Automatically deactivates plugins that cause fatal errors to prevent site crashes.
    6  * Version: 1.0.1
     6 * Version: 1.1.0
    77 * Author: Linkon Miyan
    88 * Author URI: https://profiles.wordpress.org/rudlinkon/
     
    1111 * Text Domain: fatal-plugin-auto-deactivator
    1212 * Domain Path: /languages
    13  * Requires at least: 5.2
     13 * Requires at least: 5.3
    1414 * Requires PHP: 7.0
    1515 * Tested up to: 6.8
     
    2323// Define plugin constants
    2424if ( ! defined( 'FPAD_VERSION' ) ) {
    25     define( 'FPAD_VERSION', '1.0.1' );
     25    define( 'FPAD_VERSION', '1.1.0' );
    2626}
    2727
     
    3535
    3636/**
    37  * Load plugin text domain for translations
    38  */
    39 function fpad_load_textdomain() {
    40     load_plugin_textdomain( 'fatal-plugin-auto-deactivator', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
    41 }
    42 
    43 add_action( 'plugins_loaded', 'fpad_load_textdomain' );
    44 
    45 /**
    4637 * Include required files
    4738 */
    4839require_once FPAD_PLUGIN_DIR . 'includes/class-fatal-error-handler.php';
    4940require_once FPAD_PLUGIN_DIR . 'includes/class-dropin-manager.php';
     41require_once FPAD_PLUGIN_DIR . 'includes/class-admin.php';
     42require_once FPAD_PLUGIN_DIR . 'includes/class-plugin-lifecycle.php';
     43require_once FPAD_PLUGIN_DIR . 'includes/class-utils.php';
    5044
    5145/**
    52  * Plugin activation hook
     46 * Initialize plugin classes
    5347 */
    54 function fpad_activate() {
    55     // Install the drop-in
    56     $dropin_manager = new FPAD_Dropin_Manager();
    57     $dropin_manager->install_dropin();
    58 }
    59 
    60 register_activation_hook( __FILE__, 'fpad_activate' );
     48FPAD_Utils::init();
     49FPAD_Admin::init();
     50FPAD_Plugin_Lifecycle::init();
    6151
    6252/**
    63  * Plugin deactivation hook
     53 * Register plugin hooks
    6454 */
    65 function fpad_deactivate() {
    66     // Remove the drop-in
    67     $dropin_manager = new FPAD_Dropin_Manager();
    68     $dropin_manager->remove_dropin();
    69 }
    70 
    71 register_deactivation_hook( __FILE__, 'fpad_deactivate' );
    72 
    73 /**
    74  * Check if the drop-in is installed and working
    75  */
    76 function fpad_check_dropin() {
    77     $dropin_manager = new FPAD_Dropin_Manager();
    78 
    79     // If the drop-in is not installed, try to install it
    80     if ( ! $dropin_manager->is_dropin_installed() ) {
    81         $dropin_manager->install_dropin();
    82     }
    83 }
    84 
    85 add_action( 'admin_init', 'fpad_check_dropin' );
    86 
    87 /**
    88  * Display admin notice for deactivated plugins
    89  */
    90 function fpad_admin_notices() {
    91     if ( ! current_user_can( 'activate_plugins' ) ) {
    92         return;
    93     }
    94 
    95     $deactivated_plugins = get_option( 'fpad_deactivated_plugins', [] );
    96 
    97     if ( empty( $deactivated_plugins ) ) {
    98         return;
    99     }
    100 
    101     foreach ( $deactivated_plugins as $key => $plugin_data ) {
    102         $plugin_file     = $plugin_data['plugin'];
    103         $plugin_data_obj = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_file );
    104         $plugin_name     = $plugin_data_obj['Name'] ?: $plugin_file;
    105         $error_message   = $plugin_data['error']['message'];
    106 
    107         echo '<div class="notice notice-error is-dismissible">';
    108         echo '<p>' . sprintf(
    109             /* translators: 1: Plugin name, 2: Error message */
    110                 esc_html__( 'Fatal Plugin Auto Deactivator has deactivated "%1$s" due to a fatal error: %2$s', 'fatal-plugin-auto-deactivator' ),
    111                 '<strong>' . esc_html( $plugin_name ) . '</strong>',
    112                 esc_html( $error_message )
    113             ) . '</p>';
    114         echo '</div>';
    115     }
    116 
    117     // Clear the notices after displaying them
    118     update_option( 'fpad_deactivated_plugins', [] );
    119 }
    120 
    121 add_action( 'admin_notices', 'fpad_admin_notices' );
    122 
    123 /**
    124  * Register uninstall hook
    125  */
    126 register_uninstall_hook( __FILE__, 'fpad_uninstall' );
    127 
    128 /**
    129  * Clean up plugin data on uninstall
    130  */
    131 function fpad_uninstall() {
    132     // Remove the drop-in
    133     $dropin_manager = new FPAD_Dropin_Manager();
    134     $dropin_manager->remove_dropin();
    135 
    136     // Delete plugin options
    137     delete_option( 'fpad_deactivated_plugins' );
    138     delete_option( 'fpad_deactivation_log' );
    139 }
     55register_activation_hook( __FILE__, array( 'FPAD_Plugin_Lifecycle', 'activate' ) );
     56register_deactivation_hook( __FILE__, array( 'FPAD_Plugin_Lifecycle', 'deactivate' ) );
     57register_uninstall_hook( __FILE__, array( 'FPAD_Plugin_Lifecycle', 'uninstall' ) );
  • fatal-plugin-auto-deactivator/trunk/includes/class-fatal-error-handler.php

    r3300057 r3304125  
    332332                    margin: 0;
    333333                    word-break: break-word;
     334                    white-space: pre-wrap;
    334335                }
    335336                .fpad_error_location {
  • fatal-plugin-auto-deactivator/trunk/languages/fatal-plugin-auto-deactivator.pot

    r3300057 r3304125  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Fatal Plugin Auto Deactivator 1.0.0\n"
     5"Project-Id-Version: Fatal Plugin Auto Deactivator 1.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/fatal-plugin-auto-deactivator\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-05-24T19:00:51+00:00\n"
     12"POT-Creation-Date: 2025-05-31T22:02:00+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.11.0\n"
     
    4141
    4242#. translators: 1: Plugin name, 2: Error message
    43 #: fatal-plugin-auto-deactivator.php:110
     43#: includes/class-admin.php:52
    4444msgid "Fatal Plugin Auto Deactivator has deactivated \"%1$s\" due to a fatal error: %2$s"
    4545msgstr ""
     46
     47#: includes/class-admin.php:69
     48#: includes/class-admin.php:121
     49msgid "Fatal Plugin Auto Deactivator Log"
     50msgstr ""
     51
     52#: includes/class-admin.php:70
     53msgid "Fatal Plugin Log"
     54msgstr ""
     55
     56#: includes/class-admin.php:92
     57msgid "View Log"
     58msgstr ""
     59
     60#: includes/class-admin.php:113
     61msgid "Fatal Plugin Auto Deactivator log cleared successfully."
     62msgstr ""
     63
     64#: includes/class-admin.php:129
     65msgid "Clear Log"
     66msgstr ""
     67
     68#: includes/class-admin.php:134
     69msgid "No plugin deactivations have been logged yet."
     70msgstr ""
     71
     72#: includes/class-admin.php:171
     73msgid "Date"
     74msgstr ""
     75
     76#: includes/class-admin.php:172
     77msgid "Plugin"
     78msgstr ""
     79
     80#: includes/class-admin.php:173
     81msgid "File"
     82msgstr ""
  • fatal-plugin-auto-deactivator/trunk/readme.txt

    r3300057 r3304125  
    22Contributors: rudlinkon
    33Tags: fatal error, plugin deactivation, error handling, site protection, crash prevention
    4 Requires at least: 5.2
     4Requires at least: 5.3
    55Tested up to: 6.8
    6 Stable tag: 1.0.1
     6Stable tag: 1.1.0
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    1717### Key Features
    1818
    19 * **Automatic Error Detection**: Monitors for fatal PHP errors in real-time
    20 * **Smart Plugin Identification**: Identifies which plugin is causing the fatal error
    21 * **Instant Deactivation**: Automatically deactivates the problematic plugin
     19* **Automatic Error Detection**: Monitors for fatal PHP errors in real-time using WordPress drop-in technology
     20* **Smart Plugin Identification**: Identifies which plugin is causing the fatal error through stack trace analysis
     21* **Instant Deactivation**: Automatically deactivates the problematic plugin during the shutdown phase
    2222* **Detailed Admin Notifications**: Provides clear notifications about which plugin was deactivated and why
    23 * **Error Logging**: Records detailed information about the error for troubleshooting
     23* **Persistent Error Logging**: Records detailed information about errors in a permanent log for troubleshooting
     24* **Error Log Management Page**: Dedicated admin page to view, manage, and clear error logs with detailed history
    2425* **Zero Configuration**: Works right out of the box with no setup required
    2526* **Custom Error Page**: Displays a user-friendly error page with a reload button instead of the white screen of death
     27* **Debug-Aware Display**: Shows detailed error information only when WP_DEBUG_DISPLAY is enabled for security
     28* **Drop-in Management**: Automatically installs and manages WordPress fatal-error-handler.php drop-in
    2629
    2730### How It Works
    2831
    29 When a fatal error occurs on your WordPress site, this plugin:
     32This plugin uses WordPress's built-in drop-in system to provide the most reliable error handling possible. When activated, it:
    3033
    31 1. Captures the error details during the shutdown phase
    32 2. Identifies which plugin is responsible for the error
    33 3. Automatically deactivates only that specific plugin
    34 4. Logs the action for reference
    35 5. Displays an admin notice with details when you next log in
    36 6. Shows a user-friendly error page to visitors instead of the white screen of death
     341. **Installs a Drop-in**: Creates a `fatal-error-handler.php` file in your wp-content directory
     352. **Monitors for Errors**: WordPress automatically uses this drop-in when fatal errors occur
     363. **Captures Error Details**: Records the error message, file, and line number during the shutdown phase
     374. **Identifies the Plugin**: Analyzes the error stack trace to determine which plugin caused the issue
     385. **Deactivates Safely**: Automatically deactivates only the problematic plugin
     396. **Logs Everything**: Stores detailed error information in a permanent log for troubleshooting
     407. **Notifies Admins**: Displays clear admin notices with error details when you next log in
     418. **Shows User-Friendly Pages**: Displays a custom error page with reload button instead of the white screen of death
    3742
    38 This prevents the dreaded "white screen of death" and keeps your site operational while you address the underlying issue.
     43The drop-in approach ensures maximum reliability since it operates at the WordPress core level, even when other plugins fail.
    3944
    4045### Use Cases
     
    53581. Upload the `fatal-plugin-auto-deactivator` folder to the `/wp-content/plugins/` directory
    54592. Activate the plugin through the 'Plugins' menu in WordPress
    55 3. That's it! The plugin works automatically with no configuration needed
     603. The plugin will automatically install the required drop-in file (`fatal-error-handler.php`) in your wp-content directory
     614. That's it! The plugin works automatically with no configuration needed
     62
     63**Note**: The plugin requires write permissions to your wp-content directory to install the drop-in file. If activation fails, check your file permissions.
    5664
    5765== Frequently Asked Questions ==
     
    8997This plugin specifically targets fatal PHP errors that would normally make your site inaccessible. It doesn't handle warnings, notices, or other non-fatal errors.
    9098
     99= What is a drop-in and why does this plugin use one? =
     100
     101A drop-in is a special type of WordPress file that replaces core functionality. This plugin uses the `fatal-error-handler.php` drop-in to ensure it can handle errors even when other plugins fail. The drop-in is automatically installed when you activate the plugin and removed when you deactivate it.
     102
     103= Will the drop-in conflict with other plugins? =
     104
     105No, the drop-in is specifically designed for fatal error handling and won't conflict with other plugins. If another plugin tries to install its own fatal error handler drop-in, this plugin will detect it and avoid overwriting it.
     106
     107= Why do I see detailed error information sometimes but not others? =
     108
     109For security reasons, detailed error information (file paths, line numbers, error messages) is only displayed when WP_DEBUG_DISPLAY is enabled in your WordPress configuration. When disabled, visitors see a generic error message while administrators still receive detailed notifications in the dashboard.
     110
     111= Where are the error logs stored? =
     112
     113Error logs are stored in your WordPress database as options. The plugin maintains both temporary logs (for admin notifications) and permanent logs (for troubleshooting history). You can view these through your WordPress admin dashboard.
     114
    91115== Screenshots ==
    92116
     
    97121
    98122== Changelog ==
     123
     124= 1.1.0 - 01/06/2025 =
     125- Added: New "Fatal Plugin Log" admin subpage under Tools for comprehensive error management
     126- Added: Detailed log table showing date, time, plugin, file, line number, and error message
     127- Added: "Clear Log" functionality with nonce protection
     128- Added: "View Log" action link on plugin list for quick access
     129- Added: Enhanced error type detection (Fatal, Parse, Core, etc.)
     130- Added: Security checks during drop-in file install and management
     131- Improved: Validation, sanitization, and formatting of error messages with monospace font
     132- Improved: UI styling using WordPress admin standards and alternating row colors
     133- Improved: Codebase optimized for better performance
     134- Few minor bug fixes & improvements
    99135
    100136= 1.0.1 - 25/05/2025 =
     
    107143== Upgrade Notice ==
    108144
    109 = 1.0.1 =
    110 We have improved security and fixed few bugs. Please update to the latest version.
     145= 1.1.0 =
     146We have added a dedicated admin subpage for viewing and managing error logs. Please update to the latest version.
Note: See TracChangeset for help on using the changeset viewer.