From c68aefb847b09daa0697de7684d3451e2e68ce1e Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 09 Jul 2026 23:10:23 +0000
Subject: [PATCH] =Refactor of Integrations.php to be a bit more useful with a suite of methods for create, update, delete back and forths for integrations where sharing is enabled. Also considering a single instance with a connect method to connect as the site (no user) vs connecting as an individual user - rather than recreating instances for every user.
---
inc/meta/MetaTypeManager.php | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/inc/meta/MetaTypeManager.php b/inc/meta/MetaTypeManager.php
index 4ea0aeb..a3001e8 100644
--- a/inc/meta/MetaTypeManager.php
+++ b/inc/meta/MetaTypeManager.php
@@ -50,6 +50,11 @@
'sanitize' => 'sanitize_email',
'default' => '',
],
+ 'phone' => [
+ 'type' => 'string',
+ 'sanitize' => 'sanitizePhone',
+ 'default' => '',
+ ],
'url' => [
'type' => 'string',
'sanitize' => 'esc_url_raw',
@@ -80,12 +85,17 @@
'sanitize' => 'sanitizeUser',
'default' => '',
],
+ 'post' => [
+ 'type' => 'string',
+ 'sanitize' => 'sanitizePost',
+ 'default' => '',
+ ],
'repeater' => [
'type' => 'object',
'sanitize' => 'sanitizeRepeater',
'default' => [],
],
- 'tag_list' => [
+ 'taglist' => [
'type' => 'object',
'sanitize' => 'sanitizeTagList',
'default' => []
@@ -128,7 +138,12 @@
'type' => 'string',
'sanitize' => 'sanitize_text_field',
'default' => '',
- ]
+ ],
+ 'selector' => [
+ 'type' => 'string',
+ 'sanitize' => 'sanitizeSelector',
+ 'default' => '',
+ ]
];
public static function getType(string $field_name):array
{
@@ -149,4 +164,8 @@
{
static::$type_map[$type] = $config;
}
+ public static function getTypes():array
+ {
+ return static::$type_map;
+ }
}
--
Gitblit v1.10.0