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/create-page-ability.php +11 -1 4.2.0-dev24.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,8 +14,12 @@
13 14 protected function get_ability_id(): string {
14 15 return 'elementor/create-page';
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 __( 'Create Elementor Page', 'elementor' ),
20 25 __( 'Creates a new draft post or page and marks it as built with Elementor (blank canvas in the editor). Use when the user wants a new layout shell to design in Elementor. Returns the new post ID and edit URL.', 'elementor' ),
@@ -25,8 +30,10 @@
25 30 'id' => [ 'type' => 'integer' ],
26 31 'edit_url' => [ 'type' => 'string' ],
27 32 'status' => [ 'type' => 'string' ],
28 33 'type' => [ 'type' => 'string' ],
34 + 'preview_url' => Document_Mutation_Links::preview_schema_property(),
35 + 'llm_instructions' => Document_Mutation_Links::llm_instructions_schema_property(),
29 36 ],
30 37 ],
31 38 [
32 39 'annotations' => [
@@ -131,7 +138,10 @@
131 138 'id' => (int) $post_id,
132 139 'edit_url' => $document->get_edit_url(),
133 140 'status' => get_post_status( $post_id ),
134 141 'type' => $post_type,
135 - ];
142 + ] + Document_Mutation_Links::for_document(
143 + $document,
144 + __( 'Page created.', 'elementor' )
145 + );
136 146 }
137 147 }