| @@ -80,11 +80,11 @@ | ||
| 80 | 80 | * |
| 81 | 81 | * @since 1.0.0 |
| 82 | 82 | * @access public |
| 83 | 83 | * |
| 84 | - * @param bool $to_die Optional. Whether to die at the end. Default is `true`. | |
| 84 | + * @param bool $die Optional. Whether to die at the end. Default is `true`. | |
| 85 | 85 | */ |
| 86 | - public function init( $to_die = true ) { | |
| 86 | + public function init( $die = true ) { | |
| 87 | 87 | if ( empty( $_REQUEST['post'] ) ) { |
| 88 | 88 | return; |
| 89 | 89 | } |
| 90 | 90 | |
| @@ -159,9 +159,9 @@ | ||
| 159 | 159 | |
| 160 | 160 | $this->get_loader()->print_root_template(); |
| 161 | 161 | |
| 162 | 162 | // From the action it's an empty string, from tests its `false` |
| 163 | - if ( false !== $to_die ) { | |
| 163 | + if ( false !== $die ) { | |
| 164 | 164 | die; |
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | |
| @@ -537,28 +537,8 @@ | ||
| 537 | 537 | |
| 538 | 538 | // Handle autocomplete feature for URL control. |
| 539 | 539 | add_filter( 'wp_link_query_args', [ $this, 'filter_wp_link_query_args' ] ); |
| 540 | 540 | add_filter( 'wp_link_query', [ $this, 'filter_wp_link_query' ] ); |
| 541 | - | |
| 542 | - add_filter( 'replace_editor', [ $this, 'filter_replace_editor' ], 10, 2 ); | |
| 543 | - } | |
| 544 | - | |
| 545 | - /** | |
| 546 | - * Signals to WordPress that Elementor is replacing the block editor on its own editor page, | |
| 547 | - * so that block-editor-specific behaviour (e.g. WP 7.0 COOP/COEP isolation headers) is not | |
| 548 | - * applied when the Elementor editor is active. | |
| 549 | - * | |
| 550 | - * @param bool $replace Whether the editor is being replaced. | |
| 551 | - * @param \WP_Post $post The post being edited. | |
| 552 | - * | |
| 553 | - * @return bool | |
| 554 | - */ | |
| 555 | - public function filter_replace_editor( $replace, $post ) { | |
| 556 | - if ( isset( $_REQUEST['action'] ) && 'elementor' === $_REQUEST['action'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 557 | - return true; | |
| 558 | - } | |
| 559 | - | |
| 560 | - return $replace; | |
| 561 | 541 | } |
| 562 | 542 | |
| 563 | 543 | /** |
| 564 | 544 | * @since 2.2.0 |