| @@ -38,14 +38,14 @@ | ||
| 38 | 38 | */ |
| 39 | 39 | public function register_elementor_rest_field() { |
| 40 | 40 | register_rest_field( get_post_types( '', 'names' ), |
| 41 | 41 | 'gutenberg_elementor_mode', [ |
| 42 | - 'update_callback' => function( $request_value, $obj ) { | |
| 43 | - if ( ! User::is_current_user_can_edit( $obj->ID ) ) { | |
| 42 | + 'update_callback' => function( $request_value, $object ) { | |
| 43 | + if ( ! User::is_current_user_can_edit( $object->ID ) ) { | |
| 44 | 44 | return false; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - $document = Plugin::$instance->documents->get( $obj->ID ); | |
| 47 | + $document = Plugin::$instance->documents->get( $object->ID ); | |
| 48 | 48 | |
| 49 | 49 | if ( ! $document ) { |
| 50 | 50 | return false; |
| 51 | 51 | } |
| @@ -94,12 +94,9 @@ | ||
| 94 | 94 | ?> |
| 95 | 95 | <script id="elementor-gutenberg-button-switch-mode" type="text/html"> |
| 96 | 96 | <div id="elementor-switch-mode"> |
| 97 | 97 | <button id="elementor-switch-mode-button" type="button" class="button button-primary button-large"> |
| 98 | - <span class="elementor-switch-mode-on"> | |
| 99 | - <i class="eicon-wordpress" aria-hidden="true"></i> | |
| 100 | - <?php echo esc_html__( 'Edit with WordPress', 'elementor' ); ?> | |
| 101 | - </span> | |
| 98 | + <span class="elementor-switch-mode-on"><?php echo esc_html__( '← Back to WordPress Editor', 'elementor' ); ?></span> | |
| 102 | 99 | <span class="elementor-switch-mode-off"> |
| 103 | 100 | <i class="eicon-elementor-square" aria-hidden="true"></i> |
| 104 | 101 | <?php echo esc_html__( 'Edit with Elementor', 'elementor' ); ?> |
| 105 | 102 | </span> |