PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.0-beta3
Elementor Website Builder – more than just a page builder v4.3.0-beta3
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | modules/mcp/abilities/update-settings-ability.php +10 -3 4.2.24.3.0-beta3 View file →
@@ -1,8 +1,9 @@
1 1 <?php
2 2
3 3 namespace Elementor\Modules\Mcp\Abilities;
4 4
5 +use Elementor\Modules\Mcp\Abilities\Utils\Document_Mutation_Links;
5 6 use Elementor\Plugin;
6 7
7 8 if ( ! defined( 'ABSPATH' ) ) {
8 9 exit;
@@ -13,12 +14,16 @@
13 14 protected function get_ability_id(): string {
14 15 return 'elementor/update-page-settings';
15 16 }
16 17
18 + public function is_exposed_via_proxy(): bool {
19 + return false;
20 + }
21 +
17 22 protected function get_definition(): Ability_Definition {
18 23 return new Ability_Definition(
19 24 __( 'Update Elementor Page Settings', 'elementor' ),
20 - __( 'Updates Elementor document-level settings for a post (for example page layout, title visibility, or custom page settings). Pass only the keys you want to change. Use list-pages to resolve IDs and get-page-structure when you also need the element tree. Requires permission to edit the target post.', 'elementor' ),
25 + __( 'Updates Elementor document-level settings for a post (for example page layout, title visibility, or custom page settings). Pass only the keys you want to change. Ask the user for the URL or post ID. Use get-page-structure when you also need the element tree. Requires permission to edit the target post.', 'elementor' ),
21 26 'elementor',
22 27 [
23 28 'type' => 'object',
24 29 'properties' => [
@@ -23,8 +28,10 @@
23 28 'type' => 'object',
24 29 'properties' => [
25 30 'success' => [ 'type' => 'boolean' ],
26 31 'post_id' => [ 'type' => 'integer' ],
32 + 'preview_url' => Document_Mutation_Links::preview_schema_property(),
33 + 'llm_instructions' => Document_Mutation_Links::llm_instructions_schema_property(),
27 34 ],
28 35 ],
29 36 [
30 37 'annotations' => [
@@ -29,9 +36,9 @@
29 36 [
30 37 'annotations' => [
31 38 'readonly' => false,
32 39 'idempotent' => false,
33 - 'destructive' => false,
40 + 'destructive' => true,
34 41 ],
35 42 ],
36 43 function () {
37 44 return current_user_can( 'edit_posts' );
@@ -84,7 +91,7 @@
84 91
85 92 return [
86 93 'success' => true,
87 94 'post_id' => $post_id,
88 - ];
95 + ] + Document_Mutation_Links::for_document( $document );
89 96 }
90 97 }