array( 'type' => 'integer', 'minimum' => 1, ), ); } protected function output_properties(): array { return array( 'form_id' => array( 'type' => 'integer' ), 'shortcode' => array( 'type' => 'string' ), ); } protected function required_input(): array { return array( 'form_id' ); } protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ); } protected function run( array $input ) { $form = Form_Repository::get( absint( $input['form_id'] ?? 0 ) ); if ( is_wp_error( $form ) ) { return $form; } return array( 'form_id' => (int) $form->id(), 'shortcode' => (string) $form->shortcode(), 'message' => __( 'Insert this shortcode into a post or page to show the form.', 'acrossai-abilities-manager' ), ); } }