From 0afb2c0046b55c123eafb4ab9ee77efa68d12463 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sat, 06 Jun 2026 17:15:31 +0000
Subject: [PATCH] =Starting the Favourites.js setup, converting previous Northeh stuff to new Registrar, fixing up Square.php integration to match
---
inc/registrar/config/seo/Schema.php | 42 +-----------------------------------------
1 files changed, 1 insertions(+), 41 deletions(-)
diff --git a/inc/registrar/config/seo/Schema.php b/inc/registrar/config/seo/Schema.php
index c9e83e5..86401cc 100644
--- a/inc/registrar/config/seo/Schema.php
+++ b/inc/registrar/config/seo/Schema.php
@@ -93,49 +93,8 @@
add_action('wp_head', [$this, 'outputSchema'], 1);
add_filter('the_seo_framework_schema_graph_data', [$this, 'filterTSFSchema'], 10, 2);
add_filter('the_seo_framework_title_from_custom_field', [$this, 'filterTSFOGTitle'], 10, 2);
-
- $this->maybeExcludeSingles();
}
- protected function maybeExcludeSingles(): void
- {
- $exclude = $this->cache->remember(
- 'excludeSingles',
- function () {
- $exclude = [];
- $registrar = Registrar::getInstance($this->slug);
- if ($registrar && $registrar->hasFeature('hide_single')) {
- $exclude = $this->excludeSingle();
- }
- if ($registrar && $registrar->hasFeature('is_timeline')) {
- $exclude = array_merge($exclude, $this->excludeTimeline());
- }
- return $exclude;
- }
- );
- if (!empty($exclude)) {
- add_filter('the_seo_framework_sitemap_exclude_ids', $exclude);
- }
- }
- protected function excludeSingle():array
- {
- return get_posts([
- 'post_type' => jvbCheckBase($this->slug),
- 'posts_per_page'=> -1,
- 'fields' => 'ids',
- 'post_status' => 'publish',
- ]);
- }
- protected function excludeTimeline():array
- {
- return get_posts([
- 'post_type' => jvbCheckBase($this->slug),
- 'posts_per_page'=> -1,
- 'fields' => 'ids',
- 'post_status' => 'publish',
- 'post_parent__not_in' => [0], // Only get posts with a parent
- ]);
- }
public function filterTSFSchema(array $graph, ?array $args):array
{
$based = jvbCheckBase($this->slug);
@@ -487,6 +446,7 @@
'type' => 'JVBase\inc\managers\SEO\render\Thing\CreativeWork\Comment\Answer',
'text' => wp_strip_all_tags(str_replace("\n", '', $meta->get('post_content'))),
],
+ 'answerCount' => 1,
];
$question = SchemaHelper::classFromConfig($question);
$page->setMainEntity($question);
--
Gitblit v1.10.0