| 开发者 |
iqbal1hossain
wpsharkofficial |
|---|---|
| 更新时间 | 2026年12月1日 23:25 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
UC… channel ID or a channel link, or by its handle (@elementrio) with an API key. Fully functional with nothing to unlock.[ohara_feed id="123"] shortcode, the Ohara YouTube Feed block, or a do_shortcode() PHP snippet for themes.ohara-feed-builder-for-youtube text domain.ohara/v1 and a set of filters for extending the feed types and layouts it supports:
ohara_allowed_layouts — extend the layout list beyond grid, list, and masonry.ohara_feed_layout_renderers — register a PHP renderer for a custom layout.ohara_feed_types — add a feed-type slug beyond the built-in channel.ohara_feed_type_sources — register a video-fetching callable for a custom feed type.ohara_feed_cache_args — supply the cache key for a custom feed type.ohara_sanitize_feed_source — sanitize a custom feed type's source value.ohara_validate_feed_source — accept or refuse a custom feed type's source value.ohara_feed_schema — register additional per-feed settings, which then flow through REST, storage, rendering, and the builder UI on their own.ohara_feed_slot_before_feed / ohara_feed_slot_after_feed — render your own markup above or below the feed, in every layout.ohara_settings_tabs — add a screen to Ohara → Settings, rendered by a React component you register on window.oharaSettingsPanels.ohara_feed_types only ever adds to the built-in type; it cannot remove it.
The YouTube API client exposes request(), remember(), clamp_count(), and normalize_item() so an add-on's feed type reuses this plugin's API key, transport, and cache rather than reimplementing them.
Source code and contributing
Ohara is developed in the open. The full, human-readable source — including the uncompiled React and SASS sources behind the bundles in build/, and the build scripts used to produce them — lives at:
https://github.com/wp-shark/ohara-feed-builder-for-youtube
Bug reports, feature requests, and pull requests are welcome there. To build the plugin from a checkout, run composer install && npm install && npm run build in the plugin directory.
ohara-feed-builder-for-youtube folder to /wp-content/plugins/.No. A feed set to "Without API key" reads YouTube's public video feed for the channel. That feed holds the 15 newest videos, so a keyless feed shows at most 15, and a channel has to be given by its ID (or a link containing it), not its @handle. With a free YouTube Data API v3 key you get up to 50 videos per feed and @handles. Create a Google Cloud project, enable the YouTube Data API v3, generate a key, and paste it into Ohara → Settings → General. Each feed then lets you choose "With API key".
It is set to "Without API key". YouTube's public feed holds the 15 newest videos of a channel. Add an API key and switch the feed to "With API key" in the feed editor to show up to 50.
It starts with "UC". For your own channel, YouTube shows it at youtube.com/account_advanced. For any channel: on its page, open "more" → "Share channel" → "Copy channel ID". A link to the channel page that contains the ID works too.
Go to Ohara → Create Feed, choose "Without API key" (or "With API key" if you added one), enter the channel ID or link, pick a layout, and save. Then embed the feed with the [ohara_feed id="123"] shortcode or the Ohara YouTube Feed block.
Yes. Choose the Masonry layout in the feed builder to show your YouTube channel videos as a responsive masonry video gallery. Grid and List layouts are included too.
Yes. Videos open in a lightbox popup, so visitors watch them without leaving your page.
Yes. Channel feeds, the Grid, List and Masonry layouts, the lightbox, the block and the shortcode are all free. The Pro add-on adds more feed types and layouts.
Rarely, and only for feeds set to "With API key" (feeds without a key use no quota). Feeds are stored in your database and refreshed in the background at the caching interval you choose under Ohara → Settings → Feeds, so visitors never trigger a YouTube request. A channel feed limited to videos or Shorts uses 1 quota unit per refresh.
It helps. Videos play from youtube-nocookie.com, the player loads only after a click, thumbnails can be served from your own site, and "Ask before playing" shows a notice before YouTube loads (cookie banners that already have consent are respected). Your privacy policy should still mention YouTube. See Ohara → Settings → Feeds → Privacy.
The feed keeps showing the last videos it had. Problems are listed under Ohara → Settings → Feeds → Feed status, and Ohara tries again by itself.
Every saved feed has an Embed modal with three options: the [ohara_feed id="123"] shortcode, the Ohara YouTube Feed block, and a PHP snippet for use in theme templates.
Yes. A feed is a saved, reusable record. Embed it as many times as you like; editing the feed once updates every place it appears.
Yes. Each feed is rendered as real HTML on the server first, so search engines and visitors without JavaScript still see your videos. The interactive layer loads on top of that markup.
Yes. Each feed has a card style, picture format, corner radius, spacing, title position, hover effect, play button, color scheme and colors, plus toggles for the header, titles, dates, views, likes, description and a "New" badge. For anything beyond that, use Appearance → Customize → Additional CSS or your theme's stylesheet.
Deleting the plugin removes its settings, cached feed data, and saved feeds. Deactivating it leaves everything in place, so you can safely deactivate and reactivate without losing your work.
Development happens on GitHub at https://github.com/wp-shark/ohara-feed-builder-for-youtube — open an issue for bugs and feature requests, or send a pull request. The repository's CONTRIBUTING.md covers coding standards, the security checklist, and what is expected in a PR.
Without an API key: the UC… channel ID, or a channel link that contains it. Ohara does not read YouTube's web pages, so an @handle alone cannot be looked up without a key.
With an API key, the handle works too: paste the one shown on the channel page — @elementrio — and Ohara looks up the channel ID once and remembers it, so the feed keeps working even if you remove the key later. If a channel changes its handle, clear the cache under Ohara → Settings → Feeds and the new one is looked up on the next load.
Channel — a feed of a channel's latest videos, Shorts, or both, with or without an API key. It is built in; there is nothing in this plugin to unlock. Developers can add further feed types with the ohara_feed_types and ohara_feed_type_sources filters, and an add-on plugin may ship its own.
Grid, List, and Masonry. Developers can register additional layouts with the ohara_allowed_layouts and ohara_feed_layout_renderers filters.
ohara_feed_cache_args receives the API client as a fifth argument; new filters ohara_use_rss, ohara_fetch_inline, ohara_feed_refresh_interval, ohara_purge_posts, ohara_max_videos, ohara_video_details_parts, ohara_video_details, ohara_fetched_videos, ohara_rss_item, ohara_display_settings, ohara_display_videos, ohara_card_options, ohara_card_badges, ohara_channel_header, ohara_feed_config, ohara_feed_style_props, ohara_feed_html; a cardBadges frontend slot; new schema keys cssUnit and mountClass, the choice and url sanitizers and the image control.[ohara_feed] shortcode, Ohara YouTube Feed block, and PHP snippet embeds.