From ba1e1ccf869b818f7a7a897264dfea05563a7796 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 07 Jun 2026 20:10:20 +0000
Subject: [PATCH] =Major overhaul of Integrations. Playing around with adding fields to post types through Registrar from an integrations' class file.
---
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..e0da68f 100644
--- a/inc/meta/MetaTypeManager.php
+++ b/inc/meta/MetaTypeManager.php
@@ -50,6 +50,11 @@
'sanitize' => 'sanitize_email',
'default' => '',
],
+ 'phone' => [
+ 'type' => 'string',
+ 'sanitize' => 'sanitizeTelephone',
+ '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