SDAweb Channels for YouTube

SDAweb Channels for YouTube

توسط

SDAweb Channels for YouTube is a lightweight, privacy-friendly way to showcase YouTube content on your WordPress site. Add any number of public YouTube channels and display their videos using shortcodes or a Gutenberg block. Videos are cached locally so visitor page views consume zero API quota.

Layouts & Playback

  • Grid — Responsive multi-column grid (1–4 columns)
  • Tabs — Channel-tabbed interface with 3 navigation modes: scroll, wrapping pills, and avatar strip
  • Slider — Horizontal carousel with arrow navigation
  • Auto player (default) — Adapts to screen size: inline on desktop, lightbox on mobile phones
  • Lightbox player — Fullscreen overlay with keyboard shortcuts (arrow keys, Escape), swipe gestures, and prev/next navigation
  • Inline player — Play directly inside the video card with expand-to-lightbox
  • Link mode — Opens videos on YouTube in a new tab
  • Avatar strip — Compact row of channel avatars with labeled names and smart truncation
  • Mobile bottom sheet — Touch-optimized player with swipe-to-dismiss
  • Landscape mobile — Optimized layouts: horizontal cards for live streams, 2-column grid for regular content

Live & Upcoming Streams

  • Automatic detection of live broadcasts and scheduled upcoming streams
  • Smart sort order: live streams first, then all streams sorted by proximity to the current time — the most relevant broadcasts always appear first
  • Dedicated [sdawchfo_live] shortcode for live and upcoming content
  • Live badge with concurrent viewer count and pulse animation
  • Upcoming badge with scheduled start time countdown
  • Toggleable “Live now” and “Coming up” section headings
  • Stale guard: upcoming streams auto-expire after 6 hours, live after 24 hours — no stuck statuses
  • 5-minute background polling keeps live status current (1-minute with Broadcast Boost)
  • Live Broadcast Boost — configurable day/time window for 1-minute polling during scheduled broadcasts
  • Zero-quota RSS feed discovery catches scheduled broadcasts not in the uploads playlist
  • Live and upcoming streams are automatically excluded from regular shortcodes

Channel Management

  • Add channels by URL, handle (@username), or channel ID
  • Drag-and-drop reordering controls tab and section display order
  • Custom labels per channel for friendly display names
  • Automatic video caching with configurable 1–24 hour refresh intervals (up to 3 channels per cron run)
  • Manual refresh per channel or all channels at once
  • Import and export channels and settings as JSON

Shortcodes

Four shortcodes cover every use case:

  • [sdawchfo_channel] — Videos from a single channel (by id, handle, or label)
  • [sdawchfo_channels] — Multiple channels in grid, tabs, or slider layout
  • [sdawchfo_feed] — Combined feed mixing videos from all channels
  • [sdawchfo_live] — Live and upcoming streams with empty-state message

All shortcodes support these attributes: count, columns, layout, sort, player, pagination, per_page, show_stats, show_duration, show_channel, and live_only.

Additional Features

  • Gutenberg block with live preview and inspector controls
  • Shortcode builder in the admin dashboard — no coding required
  • Customizable frontend labels (26 strings) for full translation support
  • Customizable appearance: badge styles, button styles, tab colors, and time text colors with color pickers
  • Load More pagination with configurable batch size
  • Video stats: views, likes, duration, publish date
  • Detects and labels YouTube Shorts
  • Up to 100 videos per channel with automatic API pagination
  • Import/export for easy migration between sites
  • Tab navigation modes: scroll, wrapping pills, or avatar strip
  • REST API endpoints for custom and headless integrations
  • Server cron setup guidance in the admin settings
  • Channel name truncation setting for the avatar strip
  • Automatic cleanup of private and deleted videos from cache
  • Dark theme support via CSS custom property (–sdawchfo-card-bg)
  • Admin settings: tabbed Plugin Overview with 7 sections, quick-access links, and info tooltips explaining technical terms

Privacy & Performance

  • All video data is cached in your local database
  • Visitor page views make zero external API calls
  • No cookies are set and no visitor data is sent to third parties
  • YouTube embeds use the privacy-enhanced youtube-nocookie.com domain
  • YouTube embeds load only when a visitor clicks play
  • Lazy loading: thumbnail images load only when they scroll into view

Third-Party Services

YouTube Data API v3

This plugin connects to the YouTube Data API v3 to fetch channel information and video data. API calls are made server-side only when:

  • An admin adds or refreshes a channel
  • The scheduled cron refresh runs (configurable interval, default 6 hours)
  • The live status cron runs (every 5 minutes, or every 1 minute during a configured Broadcast Boost window)

No API calls are made during normal visitor page views — all data is served from the local cache.

A YouTube Data API v3 key is required. You can obtain one for free from the Google Cloud Console.

YouTube RSS Feeds

This plugin fetches public YouTube RSS feeds (https://www.youtube.com/feeds/videos.xml) to discover recently published and scheduled videos. These requests are read-only, use no API quota, and contain only publicly available video IDs.

YouTube Embeds

When a visitor clicks play on a video, an iframe loads from YouTube’s privacy-enhanced domain (youtube-nocookie.com). No embed loads until the visitor initiates playback. No cookies are set by this domain.

  1. Upload the sdaweb-channels-for-youtube folder to /wp-content/plugins/
  2. Activate the plugin through the Plugins menu in WordPress
  3. Go to YouTube Channels > Settings and enter your YouTube Data API v3 key
  4. Click Test Connection to verify the key works
  5. Go to YouTube Channels > Dashboard or Channels to add your first channel
  6. Use the Shortcode Builder on the Dashboard to generate shortcodes, or add the Gutenberg block in the editor

سوالات متداول

Where do I get a YouTube API key?

Visit the Google Cloud Console, create a project, enable the YouTube Data API v3, and create an API key. Step-by-step instructions are included on the plugin’s Settings page.

Is the API key free?

Yes. Google provides 10,000 free quota units per day. A typical site with 10 channels uses 300–500 units per day. Visitor page views use zero quota.

How often are videos refreshed?

By default every 6 hours. You can change this to anywhere from 1 to 24 hours in Settings. Live stream status is checked every 5 minutes automatically.

How does the live stream detection work?

The plugin checks for live and upcoming broadcasts every 5 minutes using the YouTube API and RSS feeds. Currently live streams show a red LIVE badge with viewer count. Upcoming streams show a blue UPCOMING badge with a countdown to the scheduled start time. Streams are automatically sorted by proximity to the current time, so the most imminent broadcasts always appear first regardless of when they were originally scheduled.

Do live streams appear in regular shortcodes?

No. Live and upcoming streams are automatically excluded from [sdawchfo_channel], [sdawchfo_channels], and [sdawchfo_feed]. Use [sdawchfo_live] to display them separately, or add live_only="true" to any shortcode to show only live content.

How do I control the tab order?

Drag channels into the desired order on the Channels page. This order is used for tabs and sections site-wide. To set a different order on a specific page, list channel IDs in the shortcode: [sdawchfo_channels layout="tabs" ids="UCabc,UCxyz"].

Can I display more than 50 videos?

Yes. Set count to up to 100 in the shortcode or Shortcode Builder. The plugin paginates through the YouTube API automatically.

Can I migrate settings between sites?

Yes. Use the Import/Export section on the Settings page to download a JSON file with your channels and settings, then upload it on another site. Videos are not included — they are re-fetched automatically.

Does this plugin work with caching plugins?

Yes. The plugin uses WordPress transients for its own internal cache, which is compatible with object caching plugins and page caching plugins.

What are the player modes?

The plugin offers four player modes, selectable in the Shortcode Builder or via the player attribute:

  • Auto (default) — Adapts to screen size: plays inline on desktop, opens a lightbox on mobile phones. Best for sites with mixed audiences.
  • Lightbox — Always opens a fullscreen overlay with prev/next navigation. Best for desktop-heavy audiences.
  • Inline — Always plays directly inside the video card with an expand-to-lightbox button. Best for mobile-heavy audiences.
  • Link — Opens the video on YouTube in a new tab. No on-site playback.
What happens to private or deleted videos?

The plugin automatically detects and removes them. When a channel is refreshed, any cached videos that YouTube no longer returns (because they were made private, deleted, or removed from the uploads playlist) are purged from your local database.

What are the tab navigation modes?

The tabs layout offers three navigation modes, configurable in Settings > Appearance:

  • Scroll (default) — A horizontally scrollable tab bar with arrow indicators. Works well with any number of channels.
  • Wrapping Pills — All channels are shown as pill buttons that wrap to multiple rows. Best when you have many channels and want them all visible at once.
  • Avatar Strip — A compact row of channel avatars with labeled names below. Long channel names are automatically truncated with a configurable truncation direction (show beginning or end).
What is Live Broadcast Boost?

Broadcast Boost increases the live status polling frequency from every 5 minutes to every 1 minute during a configurable time window. This is useful if your channels have a regular broadcast schedule (e.g. every Saturday from 10:30 to 13:00). Enable it in Settings and choose the day and time range. Outside the boost window, normal 5-minute polling continues. For best results, set up a real server cron that runs every minute.

How do I set up a real server cron?

WordPress uses a pseudo-cron that only runs when someone visits your site, which can cause delays. For reliable scheduling:

  1. Add define('DISABLE_WP_CRON', true); to your wp-config.php (before “That’s all, stop editing!”).
  2. Set up a cron job on your server (via cPanel, Plesk, or SSH) to run every minute: */1 * * * * wget -q -O /dev/null https://yoursite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

The plugin’s Settings page shows your current cron status and provides the exact command for your site.

Videos don’t play in Vivaldi. What’s wrong?

As of version 1.4.9, the plugin uses YouTube’s privacy-enhanced embed domain (youtube-nocookie.com) which resolves most Vivaldi playback issues. If you still experience problems, Vivaldi’s built-in tracker and ad blocker may be blocking the embed. Click the shield icon in the address bar and disable the blocker for your site.

×
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
نسخه حجم فایل SHA256 تغییرات دانلود
1.5.6 136 کیلوبایت -
دانلود
×
بدون امتیاز

قیمت:

رایگان

نگارش

1.5.6

آخرین انتشار

18 اردیبهشت 1405

آخرین بروزرسانی

3 ماه پیش

نصب های فعال

40+

نگارش وردپرس

وردپرس 6.2+

تست شده از نسخه

وردپرس 6.9.4

نگارش PHP

PHP 7.4+

نسخه ها

1 نسخه