WP Manifestindependent plugin directory
manifest / integrations / oreilly-video-and-revalidate

O’Reilly Video & Revalidate (MU)

Kaltura block + Next.js revalidate hook + WPGraphQL fields. MU-loaded via top-level loader.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/kismet-git/oreilly-video-and-revalidate/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Registers the oreilly/kaltura-video Gutenberg block and wires WordPress to a Next.js App-Router site with ISR + on-publish revalidation.

Features

  • Consent-gated, lazy-loaded container for Kaltura embeds
  • GA4 data attributes: data-video="kaltura", data-entryid
  • transition_post_status → POST { path, secret } to Next /api/revalidate
  • WPGraphQL fields exposing block attributes (kalturaBlocks)
  • Multisite-safe, minimal enqueue, sanitized/escaped output

Requirements

  • WordPress 6.x, PHP 8.2+
  • WPGraphQL active
  • Next.js 15 with /api/revalidate and ISR

Install (MU)

Copy folder to wp-content/mu-plugins/oreilly-video-and-revalidate/. Loader wp-content/mu-plugins/oreilly-video-and-revalidate.php autoloads it.

Configure (wp-config.php)

define('REVALIDATE_SECRET', 'dev-secret-change-me'); define('VERCEL_REVALIDATE_URL', 'http://localhost:3001/api/revalidate');

Default path mapping

/articles/{post_name} — override with: add_filter('oreilly_revalidate_path', function($path, $post){ return '/articles/'.$post->post_name; }, 10, 2);

GraphQL example

{ postBy(slug: "kaltura-test") { slug kalturaBlocks { partnerId entryId poster autoplay consentRequired } } }