Skip to content

Commit

Permalink
[TekstTV] Put slides in root (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmens authored Nov 3, 2024
1 parent 5c3303a commit 8eefc2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions lib/teksttv.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class TekstTVAPI
{
private static $instance = null;


private $wp_timezone;

// Slide durations in milliseconds
Expand Down Expand Up @@ -60,18 +59,13 @@ public function register_api_routes()
public function get_slides()
{
if (!function_exists('get_field')) {
return new WP_REST_Response([
'slides' => [],
'error' => 'ACF plugin is niet actief'
], 200);
return new WP_REST_Response([], 200);
}

$blocks = get_field('teksttv_blokken', 'option') ?: [];
$slides = $this->process_blocks($blocks);

return new WP_REST_Response([
'slides' => $slides
], 200);
return new WP_REST_Response($slides, 200);
}

// Process different types of content blocks into slides
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
* Theme Name: Streekomroep
* Description: This is a WordPress theme made for Streekomroep ZuidWest in the Netherlands. It's made using Timber and Tailwind CSS and provides functionality for regional news, radio and television broadcasts.
* Author: Streekomroep ZuidWest
* Version: 1.10.0-beta8
* Version: 1.10.0-beta9
*/

0 comments on commit 8eefc2b

Please sign in to comment.