*/ protected function ability(): array { return array( 'name' => 'elementor/remove-element', 'args' => array( 'label' => __( 'Remove Elementor Element', 'acrossai-abilities-manager' ), 'description' => __( 'Remove the Elementor element at the given ID. Semantically identical to delete-element; force_delete required for populated or top-level elements.', 'acrossai-abilities-manager' ), 'category' => 'acrossai-elementor', 'execute_callback' => array( $this, 'execute' ), 'permission_callback' => static function (): bool { return current_user_can( 'manage_options' ) && current_user_can( 'edit_posts' ); }, 'input_schema' => array( 'type' => 'object', 'properties' => array( 'post_id' => array( 'type' => 'integer', 'minimum' => 1 ), 'element_id' => array( 'type' => 'string' ), 'force_delete' => array( 'type' => 'boolean', 'default' => false ), 'cache_scope' => array( 'type' => 'string', 'enum' => array( 'none', 'post', 'site' ), 'default' => 'post' ), ), 'required' => array( 'post_id', 'element_id' ), 'additionalProperties' => false, ), 'output_schema' => array( 'type' => 'object', 'properties' => array( 'success' => array( 'type' => 'boolean' ), 'post_id' => array( 'type' => 'integer' ), 'element_id' => array( 'type' => 'string' ), 'removed' => array( 'type' => 'object' ), 'message' => array( 'type' => 'string' ), 'error_code' => array( 'type' => 'string' ), ), 'required' => array( 'success' ), 'additionalProperties' => false, ), 'meta' => array( 'acrossai' => array( 'tab_group' => 'elementor', 'sub_group' => 'elementor-elements', 'sub_group_label' => __( 'Elements & Widgets', 'acrossai-abilities-manager' ), ), 'show_in_rest' => true, 'mcp' => array( 'public' => false, 'type' => 'tool' ), 'annotations' => array( 'readonly' => false, 'destructive' => true, 'idempotent' => false ), ), ), ); } /** * @param array $input * @return array */ public function execute( array $input = array() ): array { // Delegate to Delete_Element for identical semantics — a client-friendly alias. $delete = new Delete_Element(); return $delete->execute( $input ); } }