+44 0330 223 3428
Call Us
+44 0330 223 3428

WPTavern: WordPress 4.9 Protects Users From Fatal Errors Created in the Theme and Plugin Editors

WPTavern: WordPress 4.9 Protects Users From Fatal Errors Created in the Theme and Plugin Editors

Over the years, there have been many discussions and debates on whether or not WordPress should have a built-in file editor for themes and plugins. The file editors, while convenient, allow users to easily trigger fatal errors that can be difficult to fix, especially if they don’t have FTP access.

Instead of removing the editors from core, the WordPress development team has enhanced them by adding fatal error protection in WordPress 4.9. When a user accesses the theme or plugin editor for the first time, they’re presented with the following warnings. The warnings are a result of a three-year-old trac ticket.

Plugin Editor Warning
Theme Editor Warning

If you try to save changes to a file and WordPress detects a fatal error, the change is not saved and a warning message is displayed that explains where the error occurred. Although the changes are rolled back, the code in the editor is not replaced with the original. To replace the code, simply refresh the browser tab.

Fatal Error Detected

In addition to safety features, the code editors are powered by CodeMirror, an open-source, JavaScript powered text editor that adds features such as line numbers. The plugin editor includes the ability to look up documentation for filters, hooks, and actions with many of the links pointing to the new WordPress Developers Resource site.

Even with the addition of CodeMirror in core, the file editors in WordPress are not a replacement for an integrated development environment. However, the warnings and fatal error protection are huge improvements that will prevent many users from creating a White Screen of Death situation on their sites.



Source: WordPress

Related Post
WPTavern: WordPress 4.9 Will Support Shortcodes and Embedded Media in the Text Widget

WPTavern: WordPress 4.9 Will Support Shortcodes and Embedded Media in the Text Widget WordPress 4.8 brought TinyMCE to the core Text widget, along with brand new Image, Video, and Audio media widgets. The upcoming 4.9 release builds on this progress and will introduce some long-awaited improvements to Text widget. Users will finally be able to […]

Read more
WPTavern: WPWeekly Episode 292 – Recap of WooConf and CaboPress

WPTavern: WPWeekly Episode 292 – Recap of WooConf and CaboPress In this episode, John James Jacoby and I are joined by Cody Landefeld, co-founder of Mode Effect. Landefeld described his experience attending WooConf as we reviewed highlights from the State of the Woo. We also discussed WooCommerce retiring its Canvas theme in favor of Storefront. Jacoby […]

Read more
WPTavern: Goodnight Firebug

WPTavern: Goodnight Firebug Twitter is lighting up with sentimental Firebug remembrances today after Mozilla announced it will reach end-of-life in the Firefox browser next month. Firebug was the first browser-based tool that allowed developers to easily inspect HTML and debug JS. It was discontinued as a separate add-on and merged into Firefox DevTools in 2016 […]

Read more