equal
deleted
inserted
replaced
159 * The calling API should immediately die() after calling this function. |
159 * The calling API should immediately die() after calling this function. |
160 * |
160 * |
161 * @since 5.2.0 |
161 * @since 5.2.0 |
162 * |
162 * |
163 * @param array $error Error details from `error_get_last()`. |
163 * @param array $error Error details from `error_get_last()`. |
164 * @return true|WP_Error True if the error was handled and headers have already been sent. |
164 * @return true|WP_Error|void True if the error was handled and headers have already been sent. |
165 * Or the request will exit to try and catch multiple errors at once. |
165 * Or the request will exit to try and catch multiple errors at once. |
166 * WP_Error if an error occurred preventing it from being handled. |
166 * WP_Error if an error occurred preventing it from being handled. |
167 */ |
167 */ |
168 public function handle_error( array $error ) { |
168 public function handle_error( array $error ) { |
169 |
169 |
170 $extension = $this->get_extension_for_error( $error ); |
170 $extension = $this->get_extension_for_error( $error ); |
171 |
171 |
336 /** |
336 /** |
337 * Gets the extension that the error occurred in. |
337 * Gets the extension that the error occurred in. |
338 * |
338 * |
339 * @since 5.2.0 |
339 * @since 5.2.0 |
340 * |
340 * |
341 * @global array $wp_theme_directories |
341 * @global string[] $wp_theme_directories |
342 * |
342 * |
343 * @param array $error Error details from `error_get_last()`. |
343 * @param array $error Error details from `error_get_last()`. |
344 * @return array|false { |
344 * @return array|false { |
345 * Extension details. |
345 * Extension details. |
346 * |
346 * |