From 7333b141895467acaebd297001e6e0b3503226c5 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 31 May 2026 15:24:13 +0000
Subject: [PATCH] =fixes to cover summary outputs, projects, and more
---
taxonomies/form.php | 158 ++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 132 insertions(+), 26 deletions(-)
diff --git a/taxonomies/form.php b/taxonomies/form.php
index 7f50b8e..71bf8dc 100644
--- a/taxonomies/form.php
+++ b/taxonomies/form.php
@@ -1,32 +1,138 @@
<?php
// /taxonomies/form.php
-function ajv_form():array
+use JVBase\registrar\Registrar;
+
+if (!defined('ABSPATH')) {
+ exit;
+}
+
+add_action('plugins_loaded', 'ajv_form',1);
+//Add fields later so we can verify taxonomies/post types exist
+add_action('plugins_loaded', 'ajv_form_fields', 2);
+
+add_filter('ajv_FormSchemaDefault', 'ajv_form_schema');
+add_filter('ajv_FormMetaDefault', 'ajv_form_meta');
+add_filter('ajv_FormArchiveDefault', 'ajv_form_archive');
+
+function ajv_form(){
+ if (!class_exists('JVBase\registrar\Registrar')) {
+ return;
+ }
+ $form = Registrar::forTerm('form', 'Form', 'Forms')
+ ->setIcon('shapes')
+ ->make([
+ 'rewrite' => [
+ 'slug' => 'in/form',
+ 'with_front' => false,
+ 'hierarchical' => true,
+ ],
+ 'for' => [
+ 'art',
+ 'design',
+ 'development',
+ 'strategy',
+ 'writing'
+ ],
+ 'hierarchical' => true,
+ ])
+ ->setAll([
+ 'show_feed',
+ 'show_directory',
+ ]);
+
+}
+
+function ajv_form_fields():void
+{
+ if (!class_exists('JVBase\registrar\Registrar')) {
+ return;
+ }
+ $form = Registrar::getInstance('form');
+
+ //$directory = $form->getConfig('directory');
+ //$breadcrumbs = $form->config('breadcrumbs');
+ //$breadcrumbs->setCrumb('project');
+
+ $fields = $form->fields();
+ $fields->addCommon('wiki');
+}
+
+//function ajv_form():array
+//{
+// return [
+// 'singular' => 'Form',
+// 'plural' => 'Forms',
+// 'description' => [
+// 'From paintings to sculptures.'
+// ],
+// 'icon' => 'shapes',
+// 'show_feed' => true,
+// 'show_directory' => false,
+// 'approve_new' => false,
+// 'rewrite' => [
+// 'slug' => 'form',
+// 'with_front' => false,
+// ],
+// 'for_content' => [
+// 'art',
+// 'form',
+// 'development',
+// 'strategy',
+// 'writing',
+// ],
+// 'seo' => [
+// 'schema' => [
+// 'type' => 'DefinedTerm',
+// 'name' => '{{name}}',
+// 'description' => '{{description}}',
+// ],
+// 'meta' => [
+// 'title' => '{{name}} | Art Forms',
+// 'description' => '{{description}}',
+// ],
+// 'archive' => [
+// 'type' => 'CollectionPage',
+// 'name' => '{{name}} Art',
+// ],
+// ],
+// 'fields' => [
+// 'term_name' => [
+// 'label' => 'Name',
+// 'type' => 'text',
+// 'quickEdit' => true,
+// ],
+// 'common' => [ 'wiki' ]
+// ]
+// ];
+//}
+
+
+
+function ajv_form_schema():array
{
return [
- 'singular' => 'Form',
- 'plural' => 'Forms',
- 'description' => [
- 'From paintings to sculptures.'
- ],
- 'icon' => 'shapes',
- 'show_feed' => true,
- 'show_directory' => false,
- 'approve_new' => false,
- 'rewrite' => [
- 'slug' => 'form',
- 'with_front' => false,
- ],
- 'for_content' => [
- 'art',
- 'design',
- ],
- 'fields' => [
- 'term_name' => [
- 'label' => 'Name',
- 'type' => 'text',
- 'quickEdit' => true,
- ],
- 'common' => [ 'wiki' ]
- ]
+// 'type' => 'JVBase\managers\SEO\render\Thing\CreativeWork\CreativeWork',
+ 'name' => '{{name}} | Art Forms',
+ 'description' => '{{description}}',
];
}
+
+function ajv_form_meta():array
+{
+ return[
+ 'name' => '{{name}} | Art Forms',
+ ];
+}
+
+function ajv_form_archive(array $defaults):array
+{
+ return array_merge($defaults, [
+ 'name' => '{{name}} Art | Made in Edmonton',
+ ]);
+}
+
+function ajv_form_reference_schema(array $defaults):array
+{
+
+ return $defaults;
+}
--
Gitblit v1.10.0