| @@ -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 | } |