+
+ */
+
+ public function get_slug(): string {
+ return 'tribe/post-type-name';
+ }
+
+ public function get_args(): array {
+ return [
+ Binding_Base::LABEL => __( 'Post Type Name', 'tribe' ),
+ Binding_Base::GET_VALUE_CALLBACK => [ $this, 'tribe_get_post_type_name' ],
+ ];
+ }
+
+ public function tribe_get_post_type_name(): string {
+ // this gets us the post type, but we really want the name
+ $block_post_type = get_post_type();
+
+ if ( ! $block_post_type ) {
+ return '';
+ }
+
+ $post_object = get_post_type_object( $block_post_type );
+
+ if ( ! $post_object ) {
+ return '';
+ }
+
+ return esc_html__( $post_object->labels->singular_name, 'tribe' );
+ }
+
+}
diff --git a/wp-content/themes/core/bindings/Query_Results_Count.php b/wp-content/themes/core/bindings/Query_Results_Count.php
new file mode 100644
index 00000000..21cde58d
--- /dev/null
+++ b/wp-content/themes/core/bindings/Query_Results_Count.php
@@ -0,0 +1,49 @@
+
+
Query Results Count Placeholder
+
+ */
+
+ public function get_slug(): string {
+ return 'tribe/query-results-count';
+ }
+
+ public function get_args(): array {
+ return [
+ Binding_Base::LABEL => __( 'Query Results Count', 'tribe' ),
+ Binding_Base::GET_VALUE_CALLBACK => [ $this, 'tribe_get_query_results_count' ],
+ ];
+ }
+
+ public function tribe_get_query_results_count(): string {
+ global $wp_query;
+ $is_search = is_search();
+ $count = (int) $wp_query->found_posts;
+ $output = sprintf( _n( '%d result', '%d results', $count, 'tribe' ), number_format_i18n( $count ) );
+
+ if ( $is_search ) {
+ $output = sprintf(
+ _x(
+ '%s %s for “%s”',
+ 'First value is the number of results, second is word "result" (pluralized if necessary), third is the search term',
+ 'tribe'
+ ),
+ number_format_i18n( $count ),
+ _n( 'result', 'results', $count, 'tribe' ),
+ get_search_query()
+ );
+ }
+
+ return wp_kses_post( $output );
+ }
+
+}
diff --git a/wp-content/themes/core/blocks/tribe/post-permalink/block.json b/wp-content/themes/core/blocks/tribe/post-permalink/block.json
deleted file mode 100644
index 3517a3c9..00000000
--- a/wp-content/themes/core/blocks/tribe/post-permalink/block.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "$schema": "https://schemas.wp.org/trunk/block.json",
- "apiVersion": 3,
- "name": "tribe/post-permalink",
- "version": "0.1.0",
- "title": "Post Permalink",
- "category": "theme",
- "description": "Returns the post permalink as link text.",
- "supports": {
- "html": false,
- "spacing": {
- "margin": true,
- "padding": true
- }
- },
- "textdomain": "tribe",
- "editorScript": "file:./index.js",
- "editorStyle": "file:./index.css",
- "style": "file:./style-index.css",
- "render": "file:./render.php"
-}
diff --git a/wp-content/themes/core/blocks/tribe/post-permalink/edit.js b/wp-content/themes/core/blocks/tribe/post-permalink/edit.js
deleted file mode 100644
index 378d50a1..00000000
--- a/wp-content/themes/core/blocks/tribe/post-permalink/edit.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * React hook that is used to mark the block wrapper element.
- * It provides all the necessary props like the class name.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
- */
-import { useBlockProps } from '@wordpress/block-editor';
-
-/**
- * Server-side rendering of the block in the editor view
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-server-side-render/
- */
-import ServerSideRender from '@wordpress/server-side-render';
-
-/**
- * The edit function describes the structure of your block in the context of the
- * editor. This represents what the editor will render when the block is used.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit
- *
- * @return {Element} Element to render.
- */
-export default function Edit() {
- const blockProps = useBlockProps();
-
- return (
-
-
-
- );
-}
diff --git a/wp-content/themes/core/blocks/tribe/post-permalink/index.js b/wp-content/themes/core/blocks/tribe/post-permalink/index.js
deleted file mode 100644
index 1df126f2..00000000
--- a/wp-content/themes/core/blocks/tribe/post-permalink/index.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Registers a new block provided a unique name and an object defining its behavior.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
- */
-import { registerBlockType } from '@wordpress/blocks';
-
-/**
- * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
- * All files containing `style` keyword are bundled together. The code used
- * gets applied both to the front of your site and to the editor.
- *
- * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
- */
-import './style.pcss';
-
-/**
- * Internal dependencies
- */
-import Edit from './edit';
-import metadata from './block.json';
-
-/**
- * Every block starts by registering a new block type definition.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
- */
-registerBlockType( metadata.name, {
- ...metadata,
-
- icon: {
- src: (
-
- ),
- },
-
- /**
- * @see ./edit.js
- */
- edit: Edit,
-} );
diff --git a/wp-content/themes/core/blocks/tribe/post-permalink/render.php b/wp-content/themes/core/blocks/tribe/post-permalink/render.php
deleted file mode 100644
index 54c662c1..00000000
--- a/wp-content/themes/core/blocks/tribe/post-permalink/render.php
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
>
-
-
diff --git a/wp-content/themes/core/blocks/tribe/post-permalink/style.pcss b/wp-content/themes/core/blocks/tribe/post-permalink/style.pcss
deleted file mode 100644
index ad665a8b..00000000
--- a/wp-content/themes/core/blocks/tribe/post-permalink/style.pcss
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * The following styles get applied both on the front of your site
- * and in the editor.
- *
- * Replace them with your own styles or remove the file completely.
- */
-
-.wp-block-tribe-post-permalink {
-
- @mixin t-caption;
- color: var(--color-neutral-60);
-}
diff --git a/wp-content/themes/core/blocks/tribe/post-type-name/block.json b/wp-content/themes/core/blocks/tribe/post-type-name/block.json
deleted file mode 100644
index ae2bc985..00000000
--- a/wp-content/themes/core/blocks/tribe/post-type-name/block.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "$schema": "https://schemas.wp.org/trunk/block.json",
- "apiVersion": 3,
- "name": "tribe/post-type-name",
- "version": "0.1.0",
- "title": "Post Type Name",
- "category": "theme",
- "description": "Returns the post type name for a post object.",
- "supports": {
- "html": false,
- "spacing": {
- "margin": true,
- "padding": true
- }
- },
- "textdomain": "tribe",
- "editorScript": "file:./index.js",
- "style": "file:./style-index.css",
- "render": "file:./render.php"
-}
diff --git a/wp-content/themes/core/blocks/tribe/post-type-name/edit.js b/wp-content/themes/core/blocks/tribe/post-type-name/edit.js
deleted file mode 100644
index 0fefe1bd..00000000
--- a/wp-content/themes/core/blocks/tribe/post-type-name/edit.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * React hook that is used to mark the block wrapper element.
- * It provides all the necessary props like the class name.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
- */
-import { useBlockProps } from '@wordpress/block-editor';
-
-/**
- * Server-side rendering of the block in the editor view
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-server-side-render/
- */
-import ServerSideRender from '@wordpress/server-side-render';
-
-/**
- * The edit function describes the structure of your block in the context of the
- * editor. This represents what the editor will render when the block is used.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit
- *
- * @return {Element} Element to render.
- */
-export default function Edit() {
- const blockProps = useBlockProps();
-
- return (
-
-
-
- );
-}
diff --git a/wp-content/themes/core/blocks/tribe/post-type-name/index.js b/wp-content/themes/core/blocks/tribe/post-type-name/index.js
deleted file mode 100644
index c3057d8b..00000000
--- a/wp-content/themes/core/blocks/tribe/post-type-name/index.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Registers a new block provided a unique name and an object defining its behavior.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
- */
-import { registerBlockType } from '@wordpress/blocks';
-
-/**
- * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
- * All files containing `style` keyword are bundled together. The code used
- * gets applied both to the front of your site and to the editor.
- *
- * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
- */
-import './style.pcss';
-
-/**
- * Internal dependencies
- */
-import Edit from './edit';
-import metadata from './block.json';
-
-/**
- * Every block starts by registering a new block type definition.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
- */
-registerBlockType( metadata.name, {
- ...metadata,
-
- icon: {
- src: (
-
- ),
- },
-
- /**
- * @see ./edit.js
- */
- edit: Edit,
-} );
diff --git a/wp-content/themes/core/blocks/tribe/post-type-name/render.php b/wp-content/themes/core/blocks/tribe/post-type-name/render.php
deleted file mode 100644
index b264af85..00000000
--- a/wp-content/themes/core/blocks/tribe/post-type-name/render.php
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
>
- labels->singular_name, 'tribe' ); ?>
-
diff --git a/wp-content/themes/core/blocks/tribe/post-type-name/style.pcss b/wp-content/themes/core/blocks/tribe/post-type-name/style.pcss
deleted file mode 100644
index 25d23757..00000000
--- a/wp-content/themes/core/blocks/tribe/post-type-name/style.pcss
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * The following styles get applied both on the front of your site
- * and in the editor.
- *
- * Replace them with your own styles or remove the file completely.
- */
-
-.wp-block-tribe-post-type-name {
-
- @mixin t-category;
-}
diff --git a/wp-content/themes/core/blocks/tribe/query-results-count/block.json b/wp-content/themes/core/blocks/tribe/query-results-count/block.json
deleted file mode 100644
index 8d4a5807..00000000
--- a/wp-content/themes/core/blocks/tribe/query-results-count/block.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "$schema": "https://schemas.wp.org/trunk/block.json",
- "apiVersion": 3,
- "name": "tribe/query-results-count",
- "version": "0.1.0",
- "title": "Query Results Count",
- "category": "theme",
- "description": "Displays (in context) the total number of posts in a archive",
- "supports": {
- "html": false,
- "align": true,
- "spacing": {
- "margin": true,
- "padding": true
- }
- },
- "textdomain": "tribe",
- "editorScript": "file:./index.js",
- "editorStyle": "file:./index.css",
- "style": "file:./style-index.css",
- "render": "file:./render.php"
-}
diff --git a/wp-content/themes/core/blocks/tribe/query-results-count/edit.js b/wp-content/themes/core/blocks/tribe/query-results-count/edit.js
deleted file mode 100644
index 132de1fb..00000000
--- a/wp-content/themes/core/blocks/tribe/query-results-count/edit.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * React hook that is used to mark the block wrapper element.
- * It provides all the necessary props like the class name.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops
- */
-import { useBlockProps } from '@wordpress/block-editor';
-
-/**
- * Server-side rendering of the block in the editor view
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-server-side-render/
- */
-import ServerSideRender from '@wordpress/server-side-render';
-
-/**
- * The edit function describes the structure of your block in the context of the
- * editor. This represents what the editor will render when the block is used.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit
- *
- * @return {Element} Element to render.
- */
-export default function Edit() {
- const blockProps = useBlockProps();
-
- return (
-
-
-
- );
-}
diff --git a/wp-content/themes/core/blocks/tribe/query-results-count/index.js b/wp-content/themes/core/blocks/tribe/query-results-count/index.js
deleted file mode 100644
index 8388b5db..00000000
--- a/wp-content/themes/core/blocks/tribe/query-results-count/index.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Registers a new block provided a unique name and an object defining its behavior.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
- */
-import { registerBlockType } from '@wordpress/blocks';
-
-/**
- * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
- * All files containing `style` keyword are bundled together. The code used
- * gets applied both to the front of your site and to the editor.
- *
- * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
- */
-import './style.pcss';
-
-/**
- * Internal dependencies
- */
-import Edit from './edit';
-import metadata from './block.json';
-
-/**
- * Every block starts by registering a new block type definition.
- *
- * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
- */
-registerBlockType( metadata.name, {
- ...metadata,
-
- icon: {
- src: (
-
- ),
- },
-
- /**
- * @see ./edit.js
- */
- edit: Edit,
-} );
diff --git a/wp-content/themes/core/blocks/tribe/query-results-count/render.php b/wp-content/themes/core/blocks/tribe/query-results-count/render.php
deleted file mode 100644
index 7c5aa99f..00000000
--- a/wp-content/themes/core/blocks/tribe/query-results-count/render.php
+++ /dev/null
@@ -1,24 +0,0 @@
-found_posts;
-$output = sprintf( _n( '%d result', '%d results', $count, 'tribe' ), number_format_i18n( $count ) );
-
-if ( $is_search ) {
- $output = sprintf(
- _x(
- '%s %s for “%s”',
- 'First value is the number of results, second is word "result" (pluralized if necessary), third is the search term',
- 'tribe'
- ),
- number_format_i18n( $count ),
- _n( 'result', 'results', $count, 'tribe' ),
- get_search_query()
- );
-}
-?>
-
-
>
-
-
diff --git a/wp-content/themes/core/blocks/tribe/query-results-count/style.pcss b/wp-content/themes/core/blocks/tribe/query-results-count/style.pcss
deleted file mode 100644
index 4824d9ff..00000000
--- a/wp-content/themes/core/blocks/tribe/query-results-count/style.pcss
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * The following styles get applied both on the front of your site
- * and in the editor.
- *
- * Replace them with your own styles or remove the file completely.
- */
-
-.wp-block-tribe-query-results-count {
-
- @mixin t-body;
-
- > p {
- margin-top: 0;
- }
-
- .search-term {
- font-weight: 700;
- }
-
- /**
- * hide block if there are no search results
- * only applies to search results template.
- */
- .search-no-results & {
- display: none;
- }
-}
diff --git a/wp-content/themes/core/patterns/card-post-search-result.php b/wp-content/themes/core/patterns/card-post-search-result.php
index 19de4357..2898c7c5 100644
--- a/wp-content/themes/core/patterns/card-post-search-result.php
+++ b/wp-content/themes/core/patterns/card-post-search-result.php
@@ -14,13 +14,17 @@