From 04131a1d99929db64feaadea7bc94f2f1006f2c6 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Tue, 28 Apr 2020 18:21:16 +0200 Subject: [PATCH] expose ticks through REST API (#7) Tickers are already exposed for JS integration in Gutenberg. Now ticks themselves are also available for use with external systems. --- README.md | 1 + includes/class-scliveticker.php | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 34edf67..25fc13d 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ caching time of 12 hours obviously makes no sense. * Requires PHP 5.6 or above * Use GMT for automatic updates * Gutenberg Block available +* Ticks exposed through REST API ### 1.0.0 - 2018-11-02 diff --git a/includes/class-scliveticker.php b/includes/class-scliveticker.php index 6337bff..51f6673 100644 --- a/includes/class-scliveticker.php +++ b/includes/class-scliveticker.php @@ -165,6 +165,7 @@ class SCLiveticker { 'supports' => array( 'title', 'editor', 'author' ), 'taxonomies' => array( 'scliveticker_ticker' ), 'has_archive' => true, + 'show_in_rest' => true, ); register_post_type( 'scliveticker_tick', $args );