← All changes
|
modules/mcp/abilities/create-page-ability.php
+1
-11
4.3.0-beta3
→
4.2.1
View file →
| @@ -1,9 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace Elementor\Modules\Mcp\Abilities; |
| 4 | 4 | |
| 5 | -use Elementor\Modules\Mcp\Abilities\Utils\Document_Mutation_Links; | |
| 6 | 5 | use Elementor\Plugin; |
| 7 | 6 | |
| 8 | 7 | if ( ! defined( 'ABSPATH' ) ) { |
| 9 | 8 | exit; |
| @@ -14,12 +13,8 @@ | ||
| 14 | 13 | protected function get_ability_id(): string { |
| 15 | 14 | return 'elementor/create-page'; |
| 16 | 15 | } |
| 17 | 16 | |
| 18 | - public function is_exposed_via_proxy(): bool { | |
| 19 | - return false; | |
| 20 | - } | |
| 21 | - | |
| 22 | 17 | protected function get_definition(): Ability_Definition { |
| 23 | 18 | return new Ability_Definition( |
| 24 | 19 | __( 'Create Elementor Page', 'elementor' ), |
| 25 | 20 | __( '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' ), |
| @@ -30,10 +25,8 @@ | ||
| 30 | 25 | 'id' => [ 'type' => 'integer' ], |
| 31 | 26 | 'edit_url' => [ 'type' => 'string' ], |
| 32 | 27 | 'status' => [ 'type' => 'string' ], |
| 33 | 28 | 'type' => [ 'type' => 'string' ], |
| 34 | - 'preview_url' => Document_Mutation_Links::preview_schema_property(), | |
| 35 | - 'llm_instructions' => Document_Mutation_Links::llm_instructions_schema_property(), | |
| 36 | 29 | ], |
| 37 | 30 | ], |
| 38 | 31 | [ |
| 39 | 32 | 'annotations' => [ |
| @@ -138,10 +131,7 @@ | ||
| 138 | 131 | 'id' => (int) $post_id, |
| 139 | 132 | 'edit_url' => $document->get_edit_url(), |
| 140 | 133 | 'status' => get_post_status( $post_id ), |
| 141 | 134 | 'type' => $post_type, |
| 142 | - ] + Document_Mutation_Links::for_document( | |
| 143 | - $document, | |
| 144 | - __( 'Page created.', 'elementor' ) | |
| 145 | - ); | |
| 135 | + ]; | |
| 146 | 136 | } |
| 147 | 137 | } |