=== WPX Video Post ===
Contributors: wpxplugin
Tags: video, video post, seo, video seo, custom post type
Requires at least: 5.6
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 2.4.3
License: GPLv2 or later

Create dedicated, SEO-optimized "Video Post" content in WordPress — with its
own admin menu, video categories, VideoObject schema, and a built-in content
optimizer.

== Description ==

WPX Video Post adds a first-class "Video Post" content type to WordPress,
purpose-built for publishing and optimizing video content:

* A dedicated **Video Post** admin menu, placed immediately after "Posts",
  with its own custom "Add/Edit Video" screen — no native WordPress post
  editor UI involved at all.
* Hierarchical **Video Categories** (works just like normal Post Categories).
* Two video sources per post: Self-hosted upload (Media Library) or YouTube.
* Video thumbnail (poster), duration field, and transcript field.
* Built-in **Content Optimization** panel: focus keyword, SEO title/meta
  description with live character counters, canonical URL, Open Graph title,
  noindex toggle, and a live 0–100 optimization score with a checklist.
* Automatic **VideoObject JSON-LD schema** output for search rich results.
* View counter, "Top Performing Videos" and "Recent Activity" dashboard.
* Related videos block, `[wpx_video_post id="123"]` shortcode, adjustable
  player defaults (autoplay, mute, loop, lazy-load) with 3 color skins.
* Configurable single/archive URL slugs.
* A clean, modern violet/pink dashboard UI — distinct from other WPX plugins
  so it's easy to tell them apart in the admin menu.
* **Cloud Storage offload (recommended)**: send self-hosted videos to
  **Bunny Stream** (a dedicated video-streaming library with automatic
  transcoding and CDN delivery — the recommended option) or to a plain
  S3-compatible bucket (Wasabi, Amazon S3, DigitalOcean Spaces, or a custom
  endpoint). Upload a video in the editor and — when Cloud Storage is
  enabled and selected for that post — it's automatically pushed to your
  chosen destination and served from there instead of your own server,
  with an optional "delete local copy" setting and a one-click
  "Test Connection" check.
* A notice under the self-hosted Upload option flags that some shared
  hosting plans restrict or disallow video hosting/streaming, and points
  toward Cloud Storage as the safer default.
* **Direct browser-to-Bunny uploads** (TUS protocol) that skip the
  WordPress server entirely, plus **automatic remote cleanup**: deleting a
  video post or its Media Library attachment also deletes the
  corresponding file from Bunny Stream or your S3-compatible bucket.

== Changelog ==

= 2.4.3 =
* Made the in-player ad rotator more responsive: fluid media sizing via
  aspect-ratio instead of fixed heights, a fluid text size, safer touch
  targets on mobile/coarse-pointer devices, word-wrapping for long CTA
  text/links, and an extra breakpoint for very small screens.
* Added recommended-size guidance and enforced character limits on the
  Ads posting form: image ads (1280×720, 16:9, JPG/PNG/WebP, ~500KB),
  video ads (1280×720 or 1920×1080 MP4, ~15s), Ad Text/Caption (200
  chars, live counter), Hyperlinked Text (40 chars), CTA Button Text
  (30 chars) — enforced both in the field (maxlength) and server-side
  on save.

= 2.4.2 =
* "PRO" badges now disappear once a license is active — the Ads tab,
  Cloud Storage and AI Thumbnail Generation section headings, the PRO
  Page Theme swatches, and the per-post Cloud Storage box and
  "Generate with AI" button all hide their badge when licensed. The
  header's "Buy Pro Now" button is hidden too once already licensed.

= 2.4.1 =
* AI Thumbnail Generation is now a PRO feature — a "PRO" badge on the
  Settings section and the "Generate with AI" button; fields and the
  button stay visible but disabled without an active license, and it's
  enforced server-side (AJAX handler and settings save) too.

= 2.4.0 =
* New AI Thumbnail Generation: a "Generate with AI" button next to the
  thumbnail picker on each video. OpenAI writes a short image prompt
  from the video's title, meta description, and content/transcript,
  then Runware generates the actual thumbnail from that prompt using
  the selected model — the result is added to the Media Library and
  set as the video's poster automatically.
* New Settings → AI Thumbnail Generation section: OpenAI API key +
  model, Runware API key + model (a few common presets, or any custom
  Runware AIR model ID).

= 2.3.1 =
* Added a WPX Video Post summary widget on the main WordPress
  Dashboard (Published/Views/Likes/Avg. SEO + quick links) — on by
  default, with a "Show a WPX Video Post summary widget on the
  WordPress Dashboard" toggle in Settings to turn it off.

= 2.3.0 =
* Removed the generic "Videos / Browse the latest videos." header text
  from the video archive/homepage grid (category pages still show the
  category name).
* Added multiple Page Themes: Dark Cinematic (free default), plus
  Midnight Blue, Sunset Blaze, and Neon Purple — full color palette
  swaps for the video view page and archive/homepage grid, selectable
  from Settings → Page Theme. Only Dark Cinematic is available without
  an active PRO license; the rest are gated the same way as Cloud
  Storage (visible, disabled, enforced server-side).

= 2.2.0 =
* Redesigned the single video page into a YouTube-style two-column
  layout: player/title/description on the left, an "Up Next" sidebar
  of related videos on the right (stacked thumbnail + title + views
  cards), on a wider page. Collapses to a single column on smaller
  screens.
* New video archive/category template with a YouTube-style grid,
  category filter chips, and pagination — used for the Video Post
  archive, category pages, and (optionally) the homepage.
* New Settings → Homepage option: "Show the Video Archive as this
  site's Homepage" — when enabled, the site's root URL shows the
  video grid instead of the default blog index or static front page.

= 2.1.0 =
* New PRO feature: In-Player Ads. Create video, image, or text ad
  slides — each with a CTA button, an optional hyperlinked phrase,
  and a link — from a new "Ads" admin screen (Video Post → Ads).
* Ads rotate in a slot next to the player on the single video page,
  on a configurable interval (default 15s).
* Impression, view, and click tracking per ad, plus a performance
  summary (total impressions/views/clicks and average CTR) on the
  Ads screen.
* Gated as PRO: the Ads screen is visible but disabled without an
  active license, matching the same view-but-disabled pattern as
  Cloud Storage.

= 2.0.1 =
* Added a featured "Join Bunny Streaming Host" button (links to
  bunny.net) on the top panel header and again right after the
  Cloud Storage section on the Settings screen.

= 2.0.0 =
* Cloud Storage is now a PRO feature. A "PRO" badge appears on the
  Settings → Cloud Storage section and in each video's Cloud Storage
  box; fields stay visible so you can see how it's configured, but
  are disabled — and enforced server-side — until a license is
  active. Already-offloaded videos keep playing normally even if a
  license later lapses.
* Added an "Activate PRO" button (Settings and License screens) that
  links to https://bestplugintheme.com/product/wpx-video-post.
* License activation/deactivation and the email opt-in now redirect
  back to the License screen after saving, so the page — and every
  other screen's PRO gating — reflects the new status immediately.

= 1.9.0 =
* Integrated bestplugintheme.com licensing and install-tracking
  (telemetry). New "License" admin screen to activate/deactivate a
  license key and view status.
* Telemetry check-in (domain, plugin version, plan, WordPress/PHP
  version) now runs automatically on activation and weekly via cron —
  no prompt, per the site's Terms & Conditions.
* Sharing the site's admin email is a separate, one-time opt-in
  notice (Yes/No), changeable any time from the License screen.
  Never sent unless explicitly agreed to.

= 1.8.0 =
* Redesigned the Dashboard Overview with more stats: average views per
  video, top-liked video, top video category, cloud-offload count and
  percentage, self-hosted vs. YouTube split, and total content count.
* Added a colorful stat-card layout (distinct accent color per metric,
  icons) and a new "Video Source & Storage Breakdown" panel with
  animated split bars.
* Top Performing Videos list now shows gold/silver/bronze rank badges.

= 1.7.0 =
* Related videos on the single video page now default to showing 2 videos
  from the same Video Category (still adjustable via Settings → "Number
  of related videos to show").
* Removed the bottom sticky mini-player bar from the single video page.
* Reworked the single video page front-end into a **dark cinematic**
  theme — near-black panel, neon cyan/magenta accents, glowing play
  button, animated progress bar, and staggered fade-in on related
  video cards.

= 1.6.0 =
* Added **direct-to-Bunny video uploads**: when Bunny Stream is the active
  Cloud Storage provider, a new "⚡ Upload Directly to Bunny (Recommended)"
  option streams the file straight from the browser to Bunny Stream over
  its TUS resumable-upload protocol — the file never passes through the
  WordPress server or the Media Library, with a real (not simulated)
  upload progress bar.
* Added **automatic remote cleanup**: deleting a video post, deleting the
  Media Library attachment it used, or clicking "Remove" on the video in
  the editor now also deletes the corresponding remote file — from Bunny
  Stream or from your S3-compatible bucket — so nothing is left orphaned
  (and billed for) in the cloud.

= 1.5.0 =
* Replaced the old "BunnyCDN Storage" (S3-style object storage) provider
  with a proper **Bunny Stream** integration — Bunny's dedicated
  video-streaming library, with its own upload/create-video API and an
  embeddable HLS player, marked as the **Recommended** cloud option.
* Added a "Join Bunny" button/callout in Settings → Cloud Storage
  (https://bunny.net?ref=u4xpfcdo8g) shown when Bunny Stream is selected.
* Added a notice under the self-hosted Upload option warning that shared
  hosting may restrict video hosting/streaming, recommending Cloud Storage
  instead — which is now labeled "Recommended" in the editor too.
* Settings → Cloud Storage now shows only the fields relevant to the
  selected provider (Bunny Stream: Library ID + API Key; S3-compatible:
  Access Key/Secret/Bucket/Region/Endpoint/Path Prefix/Storage Locations).
* The per-post "Storage Location" dropdown (an S3 bucket-folder concept)
  is hidden when Bunny Stream is the active provider.

= 1.4.1 =
* Fixed a bug where visiting Video Post → Add New showed a blank page. The
  auto-draft-and-redirect step now runs on `admin_init` (before WordPress
  outputs any admin page HTML) instead of inside the page callback itself,
  where the redirect could silently fail once the page chrome had already
  started rendering.

= 1.4.0 =
* Video Posts no longer use the native WordPress post editor at all. Adding
  or editing a video post now opens a dedicated, plugin-branded "Add/Edit
  Video" screen (Video Post → Add New) instead of the standard
  title-and-Gutenberg "article" UI — post-new.php and post.php links for
  this post type are automatically redirected to it.
* Removed the "Remote URL" (direct link) video source — Self-Hosted Upload
  and YouTube remain.
* Removed the "Copy Link" option from the front-end Share menu; X/Twitter,
  Facebook, and WhatsApp remain.

= 1.3.0 =
* Made the single video post page dynamic and functional: a play-button
  overlay + live watch-progress bar on the player, a Like button (with
  animated count and a per-browser "already liked" memory), a Share menu
  (Copy Link, X/Twitter, Facebook, WhatsApp), Description/Transcript tabs
  (the transcript field is now actually shown on the front end), an
  AJAX-powered "Load More Videos" button for the related grid, and a sticky
  mini-bar with a play/pause control that appears once you scroll past the
  player.
* Added a like counter and a "Total Likes" dashboard card.

= 1.2.0 =
* Removed Vimeo as a video source (Self-Hosted, YouTube, and Remote URL
  remain).
* Added a "Storage Location" dropdown (with a custom-path option) so each
  video post can be routed to a specific folder in your cloud bucket;
  manage the list of available locations under Settings → Cloud Storage.
* Renamed the per-post cloud button to "Upload Now" and gave it a live,
  animated progress bar that fills while the upload runs and snaps to
  complete or failed when the server responds.
* General visual polish: animated gradient header, card hover/entrance
  animations, smoother fade transitions between video-source panels, and
  count-up animated numbers on the dashboard stat cards.

= 1.1.0 =
* Added Cloud Storage (S3-compatible) offload for self-hosted videos, with
  per-post "serve from cloud" toggle and a global auto-offload option.
* Redesigned the video source picker as visual icon cards with an upload
  dropzone, live cloud-upload status, and a "Test Connection" button.

= 1.0.0 =
* Initial release.

== Installation ==

1. Upload the `wpx-video-post` folder to `/wp-content/plugins/`.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. A new **Video Post** menu appears right under **Posts** — use "Add New"
   to publish your first video post, and "Categories" to organize them.
4. Visit Video Post → Settings to set player and optimization defaults.

== Notes ==

* Uses only WordPress core APIs (Media Library, taxonomies, meta boxes) — no
  external dependencies.
* Works alongside SEO plugins like Yoast/Rank Math; the built-in optimizer is
  scoped specifically to video content and can be left on regardless.
