[wp-trac] [WordPress Trac] #44458: Catch WSODs and provide a means for recovery for end users

WordPress Trac noreply at wordpress.org
Thu Dec 27 14:42:47 UTC 2018


#44458: Catch WSODs and provide a means for recovery for end users
-------------------------------------------------+-------------------------
 Reporter:  schlessera                           |       Owner:  (none)
     Type:  task (blessed)                       |      Status:  new
 Priority:  normal                               |   Milestone:  5.1
Component:  Bootstrap/Load                       |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-unit-tests needs-    |     Focuses:  multisite
  testing servehappy                             |
-------------------------------------------------+-------------------------

Comment (by flixos90):

 [attachment:"44458.11.diff"] fixes a few things and includes first steps
 to adding support for pausing and resuming themes. As usual, a better
 overview about the changes is available via https://github.com/wp-core-php
 /wordpress-develop/pull/3.

 * Fix a few minor issues @spacedmonkey pointed out on the PR.
 * Centralize logic to retrieve active themes in a new function
 `wp_get_active_and_valid_themes()`. If on a protected endpoint, paused
 themes are filtered out, just like plugins are in
 `wp_get_active_and_valid_plugins()`. The theme's `functios.php` file/s
 is/are loaded based on this function's result.
 * Introduce a `wp_using_themes()` function, that relies on
 `WP_USE_THEMES`, but in addition makes that filterable. If both parent and
 child theme are paused, this will be filtered to false on a protected
 endpoint so that no template loads in such a case (by default there are no
 protected endpoints in the frontend, but that is customizable, so we need
 to account for it).
 * Display an admin notice when a theme is paused.
 * Ensure a `WP_Theme` instance contains an error `theme_paused` if that
 theme is paused.
 * In `wp-admin/themes.php`, show paused themes as broken (via the last
 bullet point) and introduce an action link to resume them. When clicked,
 the theme is resumed appropriately.

 This is a start for supporting paused themes. It probably needs a few
 improvements and testing, especially for multisite.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44458#comment:48>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list