From 5fe601cd1962dca79c0765a54ce864af5abb7d40 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 26 Apr 2026 22:37:14 +0000
Subject: [PATCH] =test

---
 taxonomies/project.php |  828 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 700 insertions(+), 128 deletions(-)

diff --git a/taxonomies/project.php b/taxonomies/project.php
index 4f570f2..28865b6 100644
--- a/taxonomies/project.php
+++ b/taxonomies/project.php
@@ -1,138 +1,710 @@
 <?php
 // /taxonomies/progress.php
-function ajv_project():array
+use JVBase\managers\Cache;
+use JVBase\meta\Meta;
+use JVBase\registrar\Registrar;
+
+if (!defined('ABSPATH')) {
+    exit;
+}
+
+
+add_action('plugins_loaded', 'ajv_project',1);
+//Add fields later so we can verify taxonomies/post types exist
+add_action('plugins_loaded', 'ajv_project_fields', 2);
+
+add_filter('ajv_ProjectSchemaDefault', 'ajv_project_schema');
+add_filter('ajv_ProjectMetaDefault', 'ajv_project_meta');
+add_filter('ajv_ProjectArchiveDefault', 'ajv_project_archive');
+
+function ajv_project(){
+    if (!class_exists('JVBase\registrar\Registrar')) {
+        return;
+    }
+    $project = Registrar::forTerm('project', 'Project', 'Projects')
+        ->setIcon('scribble')
+        ->make([
+            'rewrite'   => [
+                'slug'          => 'projects',
+                'with_front'    => false,
+            ],
+            'for'    => [
+                'art',
+                'design',
+                'development',
+                'strategy',
+                'writing'
+            ],
+            'hierarchical'  => true,
+        ])
+        ->setAll([
+            'show_feed',
+            'show_directory',
+            'is_content'
+        ]);
+}
+function ajv_project_fields():void
 {
-    return [
-        'singular'       => 'Project',
-        'plural'         => 'Projects',
-        'icon'           => 'cards-three',
-        'show_feed'      => true,
-        'show_directory' => true,
-        'approve_new'    => false,
-        'rewrite'        => [
-            'slug'         => 'projects',
-            'with_front'   => false,
-            'hierarchical' => true,
-        ],
-        'hierarchical'   => true,
-        'for_content'    => [
-            'art',
-            'design',
-            'development',
-            'strategy',
-            'writing',
-        ],
-        'seo' => [
-            'schema' => [
-                'type' => 'CreativeWork',
-                'name' => '{{term_name}}',
-                'description' => '{{term_description}}',
-                'dateCreated' => '{{started}}',
-                'keywords' => '{{target.name}}',
+    if (!class_exists('JVBase\registrar\Registrar')) {
+        return;
+    }
+    $project = Registrar::getInstance('project');
+
+    //$directory = $project->getConfig('directory');
+    //$breadcrumbs = $project->config('breadcrumbs');
+    //$breadcrumbs->setCrumb('project');
+
+    $fields = $project->fields();
+    $fields->addField(
+        'city',
+        [
+            'type'          => 'selector',
+            'subtype'          => 'taxonomy',
+            'isReference' => true,
+            'taxonomy'      => 'city',
+            'label'         => 'City',
+            'quickEdit' => true,
+        ]
+    );
+    $fields->addField(
+        'thumbnail',
+        [
+            'type'  => 'upload',
+            'multiple'  => false,
+            'label' => 'Featured Image',
+        ]
+    );
+    $fields->addField(
+        'summary',
+        [
+            'type'  => 'textarea',
+            'quill' => true,
+            'label' => 'Summary',
+        ]
+    );
+    $fields->addField(
+        'target',
+        [
+            'type'          => 'taxonomy',
+            'isReference' => true,
+            'taxonomy'      => 'target',
+            'label'         => 'Target Audience',
+            'quickEdit' => true,
+        ]
+    );
+    $fields->addField(
+        'started',
+        [
+            'type'  => 'date',
+            'label' => 'Started',
+            'quickEdit' => true,
+        ]
+    );
+    $fields->addField(
+        'ended',
+        [
+            'type'  => 'date',
+            'label' => 'Ended',
+            'quickEdit' => true,
+        ]
+    );
+    $fields->addField(
+        'budget',
+        [
+            'type'  => 'radio',
+            'label' => 'Budget',
+            'options'   => [
+                'low'   => '$',
+                'medium-low'=> '$$',
+                'medium'    => '$$$',
+                'medium-high'=> '$$$$',
+                'high'  => '$$$$$',
+            ]
+        ]
+    );
+    $fields->addField(
+        'timeline',
+        [
+            'type'  => 'text',
+            'label' => 'Timeline',
+            'quickEdit' => true,
+        ]
+    );
+
+    $fields->addField('needs', [
+        'type'       => 'repeater',
+        'label'      => 'Needs',
+        'fields'     => [
+            'need' => [
+                'type' => 'text',
+                'label' => 'Need',
+                'required' => true
             ],
-            'meta' => [
-                'title' => '{{term_name}} | Project by JakeVan',
-                'description' => '{{term_description}}',
+            'image' => [
+                'type'  => 'upload',
+                'multiple' => true,
+                'label' => 'Example Image'
             ],
-            'archive' => [
-                'type' => 'CollectionPage',
-                'name' => '{{term_name}}',
-                'description' => '{{term_description}}',
-            ],
-        ],
-        'fields'         => [
-            'term_name' => [
-                'label'     => 'Name',
-                'type'      => 'text',
-                'quickEdit' => true,
-            ],
-            'city' => [
-                'type'          => 'taxonomy',
-                'taxonomy_type' => 'reference',
-                'taxonomy'      => 'city',
-                'autocomplete'  => true,
-                'quickEdit' => true,
-                'label'         => 'City',
-            ],
-            'target' => [
-                'type'          => 'taxonomy',
-                'taxonomy_type' => 'reference',
-                'taxonomy'      => 'target',
-                'autocomplete'  => true,
-                'quickEdit' => true,
-                'label'         => 'Target Audience',
-            ],
-            'started'   => [
-                'type'  => 'date',
-                'label' => 'Started',
-                'quickEdit' => true,
-            ],
-            'ended'     => [
-                'type'  => 'date',
-                'label' => 'Ended',
-                'quickEdit' => true,
-            ],
-            'budget'    => [
-                'type'  => 'radio',
-                'label' => 'Budget',
-                'options'   => [
-                    'low'   => '$',
-                    'medium-low'=> '$$',
-                    'medium'    => '$$$',
-                    'medium-high'=> '$$$$',
-                    'high'  => '$$$$$',
-                ]
-            ],
-            'timeline'  => [
-                'type'  => 'text',
-                'label' => 'Timeline',
-                'quickEdit' => true,
-            ],
-            'url'   => [
-                'type'  => 'url',
-                'label' => 'Project URL',
-                'quickEdit' => true,
-            ],
-            'description'   => [
+            'fulfilled' => [
                 'type'  => 'textarea',
                 'quill' => true,
-                'quickEdit' => true,
-                'label' => 'Project Description',
-            ],
-            'needs' => [
-                'type'  => 'repeater',
-                'label' => 'Needs',
-                'fields'=> [
-                    'need' => [
-                        'type' => 'text',
-                        'label' => 'Need',
-                        'required' => true
-                    ],
-                    'fulfilled' => [
-                        'type'  => 'textarea',
-                        'quill' => true,
-                        'label' => 'How I fulfilled it'
-                    ]
-                ]
-            ],
-            'wants' => [
-                'type'  => 'repeater',
-                'label' => 'Wants',
-                'fields'=> [
-                    'need' => [
-                        'type' => 'text',
-                        'label' => 'Want',
-                        'required' => true
-                    ],
-                    'fulfilled' => [
-                        'type'  => 'textarea',
-                        'quill' => true,
-                        'label' => 'How I fulfilled it'
-                    ]
-                ]
-            ],
-
-            'common'    => [ 'wiki' ]
+                'label' => 'How I fulfilled it'
+            ]
         ]
+    ]);
+    $fields->addField('wants', [
+        'type'       => 'repeater',
+        'label'      => 'Wants',
+        'fields'     => [
+            'need' => [
+                'type' => 'text',
+                'label' => 'Need',
+                'required' => true
+            ],
+            'image' => [
+                'type'  => 'upload',
+                'multiple' => true,
+                'label' => 'Example Image'
+            ],
+            'fulfilled' => [
+                'type'  => 'textarea',
+                'quill' => true,
+                'label' => 'How I fulfilled it'
+            ]
+        ]
+    ]);
+
+    $fields->addField(
+        'forType',
+        [
+            'type'  => 'repeater',
+            'label' => 'Person, Organization, or LocalBusiness this is for',
+            'fields'    => [
+                'type'  => [
+                    'type'  => 'select',
+                    'label' => 'Type',
+                    'options'   => [
+                        'JVBase\managers\SEO\render\Thing\Person'   => 'Person',
+                        'JVBase\managers\SEO\render\Thing\Organization\LocalBusiness\LocalBusiness' => 'Local Business',
+                        'JVBase\managers\SEO\render\Thing\Organization\Organization' => 'Organization'
+                    ]
+                ],
+                'name'  => [
+                    'type'  => 'text',
+                    'label' => 'Name',
+                ],
+                'url'   => [
+                    'type'  => 'url',
+                    'label' => 'Website',
+                ],
+                'location'  => [
+                    'type'  => 'text',
+                    'label' => 'Location',
+                ],
+            ]
+        ]
+    );
+    $fields->addCommon('review');
+    $fields->addCommon('wiki');
+}
+
+//function ajv_project():array
+//{
+//    return [
+//        'singular'       => 'Project',
+//        'plural'         => 'Projects',
+//        'icon'           => 'cards-three',
+//        'show_feed'      => true,
+//        'show_directory' => true,
+//        'approve_new'    => false,
+//        'rewrite'        => [
+//            'slug'         => 'projects',
+//            'with_front'   => false,
+//            'hierarchical' => true,
+//        ],
+//        'hierarchical'   => true,
+//        'for_content'    => [
+//            'art',
+//            'project',
+//            'development',
+//            'strategy',
+//            'writing',
+//        ],
+//        'seo' => [
+//            'schema' => [
+//                'type' => 'CreativeWork',
+//                'name' => '{{name}}',
+//                'description' => '{{description}}',
+//                'dateCreated' => '{{started}}',
+//                'keywords' => '{{target.name}}',
+//            ],
+//            'meta' => [
+//                'title' => '{{name}} | Project by JakeVan',
+//                'description' => '{{description}}',
+//            ],
+//            'archive' => [
+//                'type' => 'CollectionPage',
+//                'name' => '{{name}}',
+//                'description' => '{{description}}',
+//            ],
+//        ],
+//        'fields'         => [
+//            'term_name' => [
+//                'label'     => 'Name',
+//                'type'      => 'text',
+//                'quickEdit' => true,
+//            ],
+//            'city' => [
+//                'type'          => 'taxonomy',
+//                'isReference' => true,
+//                'taxonomy'      => 'city',
+//                'autocomplete'  => true,
+//                'quickEdit' => true,
+//                'label'         => 'City',
+//            ],
+//            'target' => [
+//                'type'          => 'taxonomy',
+//                'isReference' => true,
+//                'taxonomy'      => 'target',
+//                'autocomplete'  => true,
+//                'quickEdit' => true,
+//                'label'         => 'Target Audience',
+//            ],
+//            'started'   => [
+//                'type'  => 'date',
+//                'label' => 'Started',
+//                'quickEdit' => true,
+//            ],
+//            'ended'     => [
+//                'type'  => 'date',
+//                'label' => 'Ended',
+//                'quickEdit' => true,
+//            ],
+//            'budget'    => [
+//                'type'  => 'radio',
+//                'label' => 'Budget',
+//                'options'   => [
+//                    'low'   => '$',
+//                    'medium-low'=> '$$',
+//                    'medium'    => '$$$',
+//                    'medium-high'=> '$$$$',
+//                    'high'  => '$$$$$',
+//                ]
+//            ],
+//            'timeline'  => [
+//                'type'  => 'text',
+//                'label' => 'Timeline',
+//                'quickEdit' => true,
+//            ],
+//            'url'   => [
+//                'type'  => 'url',
+//                'label' => 'Project URL',
+//                'quickEdit' => true,
+//            ],
+//            'description'   => [
+//                'type'  => 'textarea',
+//                'quill' => true,
+//                'quickEdit' => true,
+//                'label' => 'Project Description',
+//            ],
+//            'needs' => [
+//                'type'  => 'repeater',
+//                'label' => 'Needs',
+//                'fields'=> [
+//                    'need' => [
+//                        'type' => 'text',
+//                        'label' => 'Need',
+//                        'required' => true
+//                    ],
+//                    'fulfilled' => [
+//                        'type'  => 'textarea',
+//                        'quill' => true,
+//                        'label' => 'How I fulfilled it'
+//                    ]
+//                ]
+//            ],
+//            'wants' => [
+//                'type'  => 'repeater',
+//                'label' => 'Wants',
+//                'fields'=> [
+//                    'need' => [
+//                        'type' => 'text',
+//                        'label' => 'Want',
+//                        'required' => true
+//                    ],
+//                    'fulfilled' => [
+//                        'type'  => 'textarea',
+//                        'quill' => true,
+//                        'label' => 'How I fulfilled it'
+//                    ]
+//                ]
+//            ],
+//
+//            'common'    => [ 'wiki' ]
+//        ]
+//    ];
+//}
+
+
+
+function ajv_project_schema():array
+{
+    return [
+//        'type'              => 'JVBase\managers\SEO\render\Thing\CreativeWork\CreativeWork',
+        'name'              => 'Projects by JakeVan',
+        'description'       => 'Each project can have multiple aspects - from Design to Strategy.',
+//        'primaryImageOfPage'    => '{{thumbnail}}',
     ];
 }
+
+function ajv_project_meta():array
+{
+    return[
+        'name' => '{{name}} | Project',
+    ];
+}
+
+function ajv_project_archive(array $defaults):array
+{
+    return array_merge($defaults, [
+        'name' => '{{name}} | Project',
+        'description'   => '{{description}}',
+        'primaryImageOfPage'    => '{{thumbnail}}',
+        'about'             => [
+            'type'              => 'JVBase\managers\SEO\render\Thing\CreativeWork\CreativeWork',
+            'name'              => '{{name}}',
+            'creator'           => '{{CREATOR}}',
+            'sourceOrganization'=> '{{forType}}',
+            'abstract'          => '{{summary}}'
+        ],
+    ]);
+}
+
+function ajv_project_reference_schema(array $defaults):array
+{
+    return $defaults;
+}
+
+function ajv_render_project_cover(int $ID):string
+{
+    return '';
+    $background = '';
+    $meta = Meta::forTerm($ID);
+    $thumbnail = $meta->get('thumbnail');
+    if ($thumbnail !== '') {
+        $background = str_replace('<img', '<img style="object-position:center center"', jvbFormatImage((int)$thumbnail));
+    }
+    return $background;
+}
+add_filter('jvbSummaryHeader', 'ajv_project_summary_header', 11, 2);
+function ajv_project_summary_header(string $return, string $type):string
+{
+    if ($type !== 'project') {
+        return $return;
+    }
+    $ID = get_queried_object_id();
+    $meta = Meta::forTerm($ID);
+    $fields = $meta->getAll();
+    $extra = 'Edmonton';
+    if ($fields['city'] !== '') {
+        $cities = explode(',', $fields['city']);
+        $temp = [];
+        foreach ($cities as $city) {
+            $term = get_term($city, 'ajv_city');
+            if ($term && !is_wp_error($term)) {
+                $temp[] = $term->name;
+            }
+        }
+        if (!empty($temp)) {
+            $extra = jvbCommaList($temp);
+        }
+    }
+    $extra .= ' Made Project';
+    return '<small>'.$extra.'</small>'.$fields['name'].'.';
+}
+
+add_filter('jvbSummaryHeaderExtra', 'ajv_project_summary_extra', 11, 2);
+function ajv_project_summary_extra(string $return, string $type):string
+{
+
+    if ($type !== 'project') {
+        return $return;
+    }
+
+
+    return '<p>Or see <a href="'.JVB()->directories()->getDirectoryList()[$type]['url'].'">all projects</a>.</p>';
+}
+
+add_filter('jvbBeforeSummary', 'ajv_project_before_summary', 10, 2);
+function ajv_project_before_summary(string $return, string $type):string
+{
+    if ($type !== 'project') {
+        return $return;
+    }
+    $meta = Meta::forTerm(get_queried_object_id());
+    $fields = $meta->getAll();
+    $rows = [];
+    if ($fields['city'] !== '') {
+        $rows[] = jvbMetaTermList($fields['city'], 'city');
+    }
+    if ($fields['target'] !== '') {
+        $rows[] = jvbMetaTermList($fields['target'], 'target');
+    }
+
+    if ($fields['started'] !== '') {
+        $rows[] = '<span>'.jvbIcon('calendar-blank').'Started:</span><time datetime="'.$fields['started'].'">'.date('F j, Y', strtotime($fields['started'])).'</time>';
+    }
+    if ($fields['ended'] !== '') {
+        $rows[] = '<span>Ended:</span><time datetime="'.$fields['ended'].'">'.date('F j, Y', strtotime($fields['ended'])).'</time>';
+    }
+
+    if ($fields['budget'] !== '') {
+        $budget = '';
+
+        for ($i = 0; $i <= (int) $fields['budget']; $i++) {
+            $budget .= '$';
+        }
+        $title = match((int)$fields['budget']) {
+            0 => 'Low',
+            1 => 'Medium Low',
+            2 => 'Medium',
+            3 => 'Medium High',
+            4 => 'High'
+        };
+        $rows[] = '<span>'.jvbIcon('currency-dollar-simple').'Budget:</span><span title="'.$title.'">'.$budget.'</span>';
+    }
+
+    if ($fields['timeline'] !== '') {
+        $rows[] = '<span>'.jvbIcon('hourglass-medium').'Timeline:</span>'.$fields['timeline'];
+    }
+    $summary = '';
+    if (!empty($rows)) {
+        $summary = '<section id="summary"><h2>At a Glance</h2><ul class="summary">';
+        $summary .= implode('', array_map(function ($row) {
+            return '<li>'.$row.'</li>';
+        }, $rows));
+        $summary .= '</ul></section>';
+    }
+
+    return $summary;
+}
+
+add_filter('jvbSummaryImage', 'ajv_project_summary_image', 10, 2);
+function ajv_project_summary_image(string $return, string $type):string
+{
+    if ($type !== 'project') {
+        return $return;
+    }
+    $meta = Meta::forTerm(get_queried_object_id());
+    $thumbnail = $meta->get('thumbnail');
+
+    return $thumbnail === '' ? '' : jvbFormatImage((int)$thumbnail);
+}
+
+add_filter('jvbSummaryDetails', 'ajv_project_summary_details', 10, 2);
+function ajv_project_summary_details(array $return, string $type):array
+{
+    if ($type !== 'project') {
+        return $return;
+    }
+
+    $return  = [];
+    $meta = Meta::forTerm(get_queried_object_id());
+    $fields = $meta->getAll();
+
+    if ($fields['summary'] !== '') {
+        $return['about-this-project'] = $fields['summary'];
+    }
+    if (!empty($fields['needs'])) {
+        $return['needs'] = ajvb_format_needs($fields['needs']);
+    }
+    if (!empty($fields['wants'])) {
+        $return['wants'] = ajvb_format_wants($fields['wants']);
+    }
+
+    if (!empty($fields['review'])) {
+        $return['review'] = $fields['review'];
+    }
+
+    return $return;
+}
+
+
+add_filter('jvbSummaryIsOpen', 'ajv_open_project_summary', 10, 2);
+function ajv_open_project_summary(bool $isOpen, string $type):bool
+{
+    if ($type !== 'project') {
+        return $isOpen;
+    }
+    return true;
+}
+
+add_filter('jvbSummaryDetailsTitle', 'ajv_project_summary_label', 10, 2);
+function ajv_project_summary_label(string $title, string $type):string
+{
+    return 'More about this project';
+}
+
+add_filter('render_block', 'ajv_project_content', 9999, 2);
+function ajv_project_content(string $OG, array $block):string {
+
+
+    if ($block['blockName'] !== 'jvb/summary') {
+        return $OG;
+    }
+    if (!is_tax(BASE.'project')) {
+        return $OG;
+    }
+
+    $menu = Cache::for('project_menu');
+    $ID = get_queried_object_id();
+    $menu->connect('term');
+    $registrar = Registrar::getInstance('project');
+    $menu->flush();
+    $nav =  $menu->remember($ID, function() use ($registrar, $ID) {
+        $types = array_map(function ($type) {
+            return jvbCheckBase($type);
+        }, $registrar->registrar->for);
+        $menu = [];
+        foreach ($types as $type) {
+            $query = new WP_Query([
+                'post_type' => $type,
+                'post_status' => 'publish',
+                'tax_query' => [[
+                    'taxonomy'  => BASE.'project',
+                    'terms'  => $ID
+                ]],
+                'posts_per_page' => 1,
+                'fields'    => 'ids',
+            ]);
+            if ($query->have_posts()) {
+                $typeRegistrar = Registrar::getInstance($type);
+                $menu[jvbNoBase($type)] = $typeRegistrar;
+            }
+            wp_reset_postdata();
+        }
+        if (!empty($menu)) {
+            global $wp;
+            $base = home_url( $wp->request );
+            $current = home_url(add_query_arg($_GET, $wp->request));
+            $class = $current === $base ? ' class="current"' : '';
+            $nav = sprintf(
+                '<nav class="filter-projects">Filter by: <ul><li><a href="%s"%s>All</a></li>',
+                $base,
+                $class
+            );
+            foreach ($menu as $slug => $registrar) {
+                $url = add_query_arg('content', $slug, $base);
+                $class = $current === $url ? ' class="current"' : '';
+                $nav .= sprintf(
+                    '<li><a href="%s"%s>%s%s</a></li>',
+                    $url,
+                    $class,
+                    jvbIcon($registrar->getIcon()),
+                    $registrar->getPlural(),
+                );
+            }
+            $nav .= '</ul></nav>';
+
+            return $nav;
+        }
+        return '';
+    });
+    global $_GET;
+    $content = array_key_exists('content', $_GET) ? $_GET['content'] : 'all';
+    $cache = Cache::for($content)->connect('term');
+    $cache->flush();
+    $page = $_GET['jpage']??1;
+    $key = $cache->generateKey([
+        'id'    => $ID,
+        'page'  => $page
+    ]);
+
+    return $OG.$cache->remember(
+        $key,
+        function() use ($content, $ID, $page, $nav, $registrar) {
+            $post_types = ($content === 'all') ? array_map(function ($type) { return jvbCheckBase($type); },$registrar->registrar->for) : jvbCheckBase($content);
+            $args = [
+                'post_type' => $post_types,
+                'posts_per_page' => 20,
+                'paged' => $page,
+                'fields'    => 'ids',
+                'tax_query' => [[
+                    'taxonomy' => BASE.'project',
+                    'field' => 'term_id',
+                    'terms' => $ID
+                ]]
+            ];
+
+            $posts = new WP_Query($args);
+            $section = '<section id="project-parts" class="project-parts">
+                <h2>Project Parts</h2>'.$nav;
+
+                if (!empty($posts->posts)) {
+                    $section .= '<ul class="project-list item-grid list-view">';
+                   foreach ($posts->posts as $postID) {
+                        $meta = Meta::forPost($postID);
+                        $fields = $meta->getAll();
+                        $link = get_the_permalink($postID);
+                        $thumb = '';
+                        if (!empty($fields['post_thumbnail'])) {
+                            $thumb = sprintf(
+                                '<a href="%s">%s</a>',
+                                $link,
+                                jvbFormatImage($fields['post_thumbnail'])
+                                );
+                        }
+                        $published = '';
+                        if (!empty($fields['post_date'])) {
+                            $published = sprintf('<span>%s<time datetime="%s">%s</time></span>',
+                            jvbIcon('calendar-blank'),
+                            $fields['post_date'],
+                            date('F j, Y', strtotime($fields['post_date']))
+                            );
+                        }
+                        $section .= sprintf(
+                            '<li class="item">%s<div class="col start w-full">
+					<h3><a href="%s">%s</a></h3>
+					%s
+					%s
+				</div></li>',
+                            $thumb,
+                            $link,
+                            $fields['post_title'],
+                            $published,
+                            $fields['post_excerpt']
+                        );
+                    }
+
+                    $section .= '</ul>';
+
+                    $total = $posts->max_num_pages;
+                    if ($total > 1) {
+                        $big = 999999999; // need an unlikely integer
+                        $format = ($content === 'all') ? '' : '&content='.$content;
+                        echo paginate_links([
+                            'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
+                            'format' => '?jpage=%#%'.$format,
+                            'current' => $page,
+                            'total' => $total
+                        ]);
+                    }
+                } else {
+                    $section .= '<p>Nothing here yet.</p>';
+                }
+
+            $section .= '</section>';
+            wp_reset_postdata();
+            return $section;
+        }
+    );
+}
+
+add_filter('jvbSummaryOnThisPage', 'ajv_project_on_this_page', 10, 2);
+function ajv_project_on_this_page(array $ids, string $type):array {
+    if ($type !== 'project'){
+        return $ids;
+    }
+    $ids[] = 'project-parts';
+    return $ids;
+}
\ No newline at end of file

--
Gitblit v1.10.0