diff --git a/wp-content/plugins/embl-taxonomy/includes/register.php b/wp-content/plugins/embl-taxonomy/includes/register.php
index fbbbf0b5c..ee1e83e8e 100644
--- a/wp-content/plugins/embl-taxonomy/includes/register.php
+++ b/wp-content/plugins/embl-taxonomy/includes/register.php
@@ -768,21 +768,21 @@ public function action_admin_notices() {
$notice = false;
// Sync required (all pages)
- if (($now - $modified) >= EMBL_Taxonomy::MAX_AGE) {
- printf('
= $current_date) {
echo esc_html($registration_closing_on_site);
diff --git a/wp-content/themes/vf-wp-groups/acf-json/group_621c848f8d8cc.json b/wp-content/themes/vf-wp-groups/acf-json/group_621c848f8d8cc.json
index 51f929db3..9e1438f8b 100644
--- a/wp-content/themes/vf-wp-groups/acf-json/group_621c848f8d8cc.json
+++ b/wp-content/themes/vf-wp-groups/acf-json/group_621c848f8d8cc.json
@@ -6,6 +6,7 @@
"key": "field_621c849c2ad18",
"label": "Custom template",
"name": "vf_groups_custom_blog_template",
+ "aria-label": "",
"type": "true_false",
"instructions": "",
"required": 0,
@@ -20,6 +21,78 @@
"ui": 1,
"ui_on_text": "",
"ui_off_text": ""
+ },
+ {
+ "key": "field_67a1dcd7dc54b",
+ "label": "WP REST API 1",
+ "name": "wp_rest_api_1",
+ "aria-label": "",
+ "type": "url",
+ "instructions": "",
+ "required": 0,
+ "conditional_logic": 0,
+ "wrapper": {
+ "width": "",
+ "class": "",
+ "id": ""
+ },
+ "default_value": "",
+ "allow_in_bindings": 0,
+ "placeholder": ""
+ },
+ {
+ "key": "field_67a1dcf6dc54c",
+ "label": "WP REST API 2",
+ "name": "wp_rest_api_2",
+ "aria-label": "",
+ "type": "url",
+ "instructions": "",
+ "required": 0,
+ "conditional_logic": 0,
+ "wrapper": {
+ "width": "",
+ "class": "",
+ "id": ""
+ },
+ "default_value": "",
+ "allow_in_bindings": 1,
+ "placeholder": ""
+ },
+ {
+ "key": "field_67a1dcfcdc54d",
+ "label": "WP REST API 3",
+ "name": "wp_rest_api_3",
+ "aria-label": "",
+ "type": "url",
+ "instructions": "",
+ "required": 0,
+ "conditional_logic": 0,
+ "wrapper": {
+ "width": "",
+ "class": "",
+ "id": ""
+ },
+ "default_value": "",
+ "allow_in_bindings": 1,
+ "placeholder": ""
+ },
+ {
+ "key": "field_67a1dd710c148",
+ "label": "Custom endpoints",
+ "name": "",
+ "aria-label": "",
+ "type": "message",
+ "instructions": "",
+ "required": 0,
+ "conditional_logic": 0,
+ "wrapper": {
+ "width": "",
+ "class": "",
+ "id": ""
+ },
+ "message": "Use the field below to customize the blogs feed",
+ "new_lines": "wpautop",
+ "esc_html": 0
}
],
"location": [
@@ -39,6 +112,5 @@
"hide_on_screen": "",
"active": true,
"description": "",
- "modified": 1646037185
-
+ "show_in_rest": 0
}
\ No newline at end of file
diff --git a/wp-content/themes/vf-wp-groups/index.php b/wp-content/themes/vf-wp-groups/index.php
index 284f09b45..5cb28355d 100644
--- a/wp-content/themes/vf-wp-groups/index.php
+++ b/wp-content/themes/vf-wp-groups/index.php
@@ -15,7 +15,10 @@
$page_for_posts_id = get_option( 'page_for_posts' );
$title = $vf_theme->get_title();
$slug = get_page_by_path( 'blog' );
-$custom_template = get_field('vf_groups_custom_blog_template', $slug->ID);
+$custom_template = get_field('vf_groups_custom_blog_template', $page_for_posts_id);
+$endpoint1 = get_field('wp_rest_api_1', $page_for_posts_id);
+$endpoint2 = get_field('wp_rest_api_2', $page_for_posts_id);
+$endpoint3 = get_field('wp_rest_api_3', $page_for_posts_id);
if ($custom_template) {
if (class_exists('VF_WP_Hero_Blog')) {
@@ -45,14 +48,136 @@
+
+
is_last_post()) {
echo '
';
}
+ } }
+ else {
+ $fetchPosts = '
+';
+
+ echo $fetchPosts;
+
+
+ }?>
+
+
diff --git a/wp-content/themes/vf-wp-groups/partials/sepe-filter.php b/wp-content/themes/vf-wp-groups/partials/sepe-filter.php
new file mode 100644
index 000000000..7376011b4
--- /dev/null
+++ b/wp-content/themes/vf-wp-groups/partials/sepe-filter.php
@@ -0,0 +1,33 @@
+
+
+
\ No newline at end of file
diff --git a/wp-content/themes/vf-wp-groups/partials/vf-summary--pb-event.php b/wp-content/themes/vf-wp-groups/partials/vf-summary--pb-event.php
new file mode 100644
index 000000000..a23d4ce0d
--- /dev/null
+++ b/wp-content/themes/vf-wp-groups/partials/vf-summary--pb-event.php
@@ -0,0 +1,57 @@
+
+
+
+
+
+ format('M') == $end->format('M')) {
+ echo $start->format('j'); ?> - format('j F Y'); }
+ else {
+ echo $start->format('j M'); ?> - format('j F Y'); }
+ }
+ else {
+ echo $start->format('j F Y');
+ } }
+ if ($startTime) {
+ echo ', ' . $startTime;
+ }
+ if ($endTime) {
+ echo ' - '. $endTime . ' CET';
+ }
+ ?>
+
+
+
+
+
+
+
+
+ current_post +1 < $forthcomingLoop->post_count) {
+ echo '
';
+
+} ?>
+
diff --git a/wp-content/themes/vf-wp-groups/style.css b/wp-content/themes/vf-wp-groups/style.css
index b622b4455..6df4b5cb5 100644
--- a/wp-content/themes/vf-wp-groups/style.css
+++ b/wp-content/themes/vf-wp-groups/style.css
@@ -24,4 +24,25 @@ ul li ul.children li {
color: #111;
}
-
\ No newline at end of file
+ .loader {
+ width: 48px;
+ height: 48px;
+ border: 5px solid #FFF;
+ border-bottom-color: rgb(59, 111, 182);
+ border-radius: 50%;
+ display: inline-block;
+ box-sizing: border-box;
+ animation: rotation 1s linear infinite;
+ }
+
+ @keyframes rotation {
+ 0% {
+ transform: rotate(0deg);
+ }
+
+ 100% {
+ transform: rotate(360deg);
+ }
+ }
+
+
\ No newline at end of file
diff --git a/wp-content/themes/vf-wp-groups/template-sepe-events.php b/wp-content/themes/vf-wp-groups/template-sepe-events.php
new file mode 100644
index 000000000..03a013510
--- /dev/null
+++ b/wp-content/themes/vf-wp-groups/template-sepe-events.php
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
EMBL organises and takes part in public engagement and outreach events across Europe.
+
Select the location to see details of all the events that happened there.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 100,
+ 'post_type' => 'vf_event',
+ 'order' => 'ASC',
+ 'orderby' => 'meta_value_num',
+ 'meta_key' => 'vf_event_start_date',
+ 'meta_query' => [
+ 'relation' => 'OR',
+ [
+ 'key' => 'vf_event_start_date',
+ 'value' => $current_date,
+ 'compare' => '>=',
+ 'type' => 'numeric'
+ ],
+ [
+ 'key' => 'vf_event_end_date',
+ 'value' => $current_date,
+ 'compare' => '>=',
+ 'type' => 'numeric'
+ ],
+ [
+ 'key' => 'vf_event_start_date',
+ 'value' => date('Ymd', strtotime('now')),
+ 'type' => 'numeric',
+ 'compare' => '>='
+ ]
+ ]
+ ]);
+
+ while ($forthcomingLoop->have_posts()) : $forthcomingLoop->the_post();
+ include locate_template('partials/vf-summary--pb-event.php', false, false);
+ endwhile;
+ wp_reset_postdata();
+ ?>
+
+
+
+ No upcoming events found
+
+
+
+
+
+
+
+
+
+
+ the_content(); ?>
+
+
+
+
+
+
+
+
+
+
diff --git a/wp-content/themes/vf-wp/functions.php b/wp-content/themes/vf-wp/functions.php
index 602665a60..e67bb8d93 100644
--- a/wp-content/themes/vf-wp/functions.php
+++ b/wp-content/themes/vf-wp/functions.php
@@ -509,6 +509,48 @@ function get_events_posts($request) {
}
}
+/*
+Register the custom REST API route to get all posts
+*/
+
+// /wp-json/custom/v1/all-posts/
+
+add_action('rest_api_init', function () {
+ register_rest_route('custom/v1', '/all-posts/', array(
+ 'methods' => 'GET',
+ 'callback' => 'custom_api_get_all_posts',
+ ));
+});
+
+// Callback function to fetch all posts
+function custom_api_get_all_posts($request) {
+ $args = array(
+ 'post_type' => 'post',
+ 'posts_per_page' => -1, // Fetch all posts
+ 'post_status' => 'publish',
+ );
+
+ $query = new WP_Query($args);
+ $posts = array();
+
+ if ($query->have_posts()) {
+ while ($query->have_posts()) {
+ $query->the_post();
+ $posts[] = array(
+ 'title' => get_the_title(),
+ 'excerpt' => get_the_excerpt(),
+ 'date' => get_the_date(),
+ 'link' => get_permalink(),
+ 'featured_image_src' => get_the_post_thumbnail_url(get_the_ID(), 'full')
+ );
+ }
+ wp_reset_postdata();
+ }
+
+ return rest_ensure_response($posts);
+}
+
+
diff --git a/wp-content/themes/vf-wp/functions/theme-block.php b/wp-content/themes/vf-wp/functions/theme-block.php
index ab66b1a24..3254f0d8c 100644
--- a/wp-content/themes/vf-wp/functions/theme-block.php
+++ b/wp-content/themes/vf-wp/functions/theme-block.php
@@ -140,6 +140,7 @@ public function acf_init() {
}
// Setup render callback using VF Gutenberg plugin or fallback
+
$callback = function() {
$args = func_get_args();
$template = $this->config['acf']['renderTemplate'];
@@ -157,10 +158,24 @@ public function acf_init() {
} else {
$block = $args[0];
$is_preview = $args[2];
+
+ // Check if the block is 'acf/vfwp-card'
+ $is_vfwp_card = isset($block['name']) && $block['name'] === 'acf/vfwp-card';
+
+ // Add wrapper to disable link clicks only for 'acf/vfwp-card' in preview
+ if ($is_preview && $is_vfwp_card) {
+ echo '';
+ }
+
include($template);
+
+ if ($is_preview && $is_vfwp_card) {
+ echo '
';
+ }
}
};
+
if ($json) {
// Use modern block.json registration