(int) ( $item['id'] ?? 0 ), 'name' => (string) ( $item['name'] ?? '' ), 'format' => isset( $item['format'] ) && $item['format'] !== '' ? (string) $item['format'] : 'inline', ); } /** * Returns the JSON Schema for a single Form item, including the `format` * field added by map_item(). * * @since 3.4.0 * * @return array */ protected function get_item_schema() { return array( 'type' => 'object', 'required' => array( 'id', 'name', 'format' ), 'properties' => array( 'id' => array( 'type' => 'integer', 'description' => __( 'Numeric ID of the Kit Form.', 'convertkit' ), ), 'name' => array( 'type' => 'string', 'description' => __( 'Human-readable name of the Kit Form.', 'convertkit' ), ), 'format' => array( 'type' => 'string', 'enum' => array( 'inline', 'modal', 'slide in', 'sticky bar' ), 'description' => __( 'Where and how the Form is displayed. Inline forms render in post content; modal / slide in / sticky bar forms are site-wide overlays triggered elsewhere.', 'convertkit' ), ), ), ); } }