IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 26 | 26 | */ |
| 27 | 27 | public function handle() { |
| 28 | 28 | // Bail if WordPress executed successfully. |
| 29 | | if ( defined( 'WP_EXECUTION_SUCCEEDED' ) && WP_EXECUTION_SUCCEEDED ) { |
| | 29 | if ( $this->execution_succeeded() ) { |
| 30 | 30 | return; |
| 31 | 31 | } |
| 32 | 32 | |
| … |
… |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
| | 53 | /** |
| | 54 | * Check if execution has succeeded. |
| | 55 | * |
| | 56 | * @since 5.1.0 |
| | 57 | * |
| | 58 | * @return bool $execution_succeeded If execution has succeeded |
| | 59 | */ |
| | 60 | function execution_succeeded() { |
| | 61 | $execution_succeeded = ( defined( 'WP_EXECUTION_SUCCEEDED' ) && WP_EXECUTION_SUCCEEDED ); |
| | 62 | if ( function_exists( 'apply_filters' ) ) { |
| | 63 | /** |
| | 64 | * Filters the value of WP_EXECUTION_SUCCEEDED constant. |
| | 65 | * |
| | 66 | * @since 5.1.0 |
| | 67 | * |
| | 68 | * @param bool $execution_succeeded Default value of WP_EXECUTION_SUCCEEDED. |
| | 69 | */ |
| | 70 | $execution_succeeded = apply_filters( 'wp_execution_succeeded', $execution_succeeded ); |
| | 71 | } |
| | 72 | |
| | 73 | return $execution_succeeded; |
| | 74 | } |
| | 75 | |
| 53 | 76 | /** |
| 54 | 77 | * Detects the error causing the crash if it should be handled. |
| 55 | 78 | * |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 289 | 289 | * @var bool |
| 290 | 290 | */ |
| 291 | 291 | define( 'REST_REQUEST', true ); |
| 292 | | |
| | 292 | add_filter( 'wp_execution_succeeded', '__return_false' ); |
| 293 | 293 | // Initialize the server. |
| 294 | 294 | $server = rest_get_server(); |
| 295 | 295 | |
| … |
… |
|
| 299 | 299 | $route = '/'; |
| 300 | 300 | } |
| 301 | 301 | $server->serve_request( $route ); |
| 302 | | |
| | 302 | remove_filter( 'wp_execution_succeeded', '__return_false' ); |
| 303 | 303 | // We're done. |
| 304 | 304 | die(); |
| 305 | 305 | } |