开发者 |
urkekg
techwebux |
---|---|
更新时间 | 2023年5月28日 14:53 |
捐献地址: | 去捐款 |
PHP版本: | 7.4 及以上 |
WordPress版本: | 6.2 |
版权: | GPLv3 |
版权网址: | 版权信息 |
default
), HTML5 (iframe
), HTML5 Asynchronous (iframe2
) abd Playlist Embed (playlist
)iframe2
) does not support Enhanced Privacy due to YouTube API limitationsstyle.css
from the child theme or Head & Footer Code plugin to custom style and tweak the look and feel of the My YouTube Channel blocks. You can utilise the following classes:
.widget_youtube-channel
– class of whole widget (parent for widget title and YTC block).youtube_channel
– YTC block wrapper class. Additional classes are available:.default
– for non-responsive block.responsive
– when you have enabled responsive option.ytc_title
– class for video title container above thumbnail/video object.ytc_title_above
- additional class for video title above video/thumbnail.ytc_title_below
- additional class for video title below video/thumbnail.ytc_title_inside
- additional class for video title printed inside of the thumbnail.ytc_title_inside_bottom
- additional class for bottom aligned video title printed inside of the thumbnail.ytc_video_container
– class of container for single item, plus:.ytc_video_1
, .ytc_video_2
, … – class of container for single item with ordering number of item in widget.ytc_video_first
– class of first container for single item.ytc_video_mid
– class of all other containers for single item.ytc_video_last
– class of last container for single item.ar16_9
– class for Aspect Ratio 16:9.ar4_3
– class for Aspect Ration 4:3.ytc_thumb
– class of anchor for Thumbnail mode.fluid-width-video-wrapper
– class for parent element of IFRAME for enabled responsive.ytc_description
– class for video description text below thumbnail/video object.ytc_link
– class of container for link to channelyoutube-channel.php
as a potential risk because base64_encode()
and base64_decode()
functions, remember that we use this two functions to store and restore JSON feeds to transient cache, so potential detection is false positive.
鸣谢
[youtube_channel]
. Default plugin parameters will be used for shortcode, but you can customize all parameters per shortcode.
General Settings
class
(string) Set custom class if you wish to target special styling for specific YTC blockchannel
(string) ID of preferred YouTube channel. Do not set full URL to channel, but just last part from URL - ID (name)handle
(string) defined custom handle from YouTube handlevanity
(string) DEPRECATED part after www.youtube.com/c/ from Custom URLusername
(string) DEPRECATED Optional legacy YouTube username.playlist
(string) ID of preferred YouTube playlist.resource
(int) Resource to use for feed:0
Channel (User uploads)1
DEPRECATED Favorites (for defined channel)2
Playlist3
DEPRECATED Liked Videoscache
(int) Period in seconds for caching feed. You can disable caching by setting this option to 0, but if you have a lot of visits, consider at least short caching (couple minutes).fetch
(int) Number of videos that will be used as stack for random pick (min 2, max 50)num
(int) Number of videos to display per YTC block.random
(bool) Option to randomize videos on every page load.ratio
(int) Set preferred aspect ratio for thumbnail and video. You can use:3
16:9 (widescreen)1
4:3responsive
(bool) Distribute one full width video per row.width
(int) Width of thumbnail and video in pixels.display
(string) Object that will be used to represent video. We have couple predefined options:thumbnail
Thumbnail will be used and video will be loaded in lightbox. (default)iframe
HTML5 (iframe)iframe2
HTML5 (iframe) with asynchronous loading - recommendedplaylist
Embedded playlist (same behaviour as old function only_pl
)thumb_quality
(string) Define image quality for thumbnail display mode. Default is hqdefault
, available:default
Default Quality (120x90px)mqdefault
Medium Quality (320x180px)hqdefault
High Quality (480x360px)sddefault
Standard Definition (640x480px)maxresdefault
Maximum Resolution (1280x720px)no_thumb_title
(bool) By default YouTube thumbnail will have tooltip with info about video title and date of publishing. By setting this option to 1 or true you can hide tooltipthemelight
(bool) By default YouTube have dark play controls theme. By setting this option to 1 or true you can get light theme in player (HTML5 and Flash)controls
(bool) Set this option to 1 or true to hide playback controls.autoplay
(bool) Enable autoplay of first video in YTC video stack by setting this option to 1 or truemute
(bool) Set this option to 1 or true to mute videos set to autoplay on loadnorel
(bool) Set this option to 1 or true to hide related videos after finished playbaknobrand
(bool) Set this option to 1 or true to hide YouTube logo from playback control barnolightbox
(bool) Set this option to 1 or true to prevent YTC block with thumbnail to open in lightbox. If you have other plugin that trigger youtube links for lightbox, that one will steal links from this YTC block.target
(string) If you enable nolightbox for specific YTC block, you can force opening of thumbnail links in new tab/window if you set this shortcode option to _blank
like target="_blank"
.showtitle
(string):none
- Hide titleabove
- Display title above video/thumbnailbelow
- Display title below video/thumbnailinside
- Display top aligned title inside thumbnail; if display
is not thumbnail
then treat as above
inside_b
- Display bottom aligned title inside thumbnail; if display
is not thumbnail
then treat as below
titletag
- Video title HTML tag to wrap title (H3, H4, H5, div, span, strong, etc)showdesc
(bool) Set to 1 or true to show video description.desclen
(int) Set number of characters to cut down length of video description. Set to 0 to use full length description.noinfo
(bool) Set to 1 or true to hide overlay video infos (from embedded player)noanno
(bool) Set to 1 or true to hide overlay video annotations (from embedded player)goto_txt
(string)popup
(int) Control where link to channel will be opened:0
open link in same window1
DEPRECATED open link in new window with JavaScript2
open link in new window with target="_blank" anchor attributelink_to
(string) URL to link:none
Hide link (defult)handle
YouTube handle URLchannel
Channel pagevanity
DEPRECATED Vanity custom URLlegacy
DEPRECATED Legacy username pageyoutube-channel
directory to the wp-content/plugins/
directory on the server.Please folllow Installation instructions.
We cannot afford licenses for various premium themes and plugins to keep the fee plugin My YouTube Channel working with each of them.
If My YouTube Channel clash with a premium theme or plugin, we can help you only if you help us. Ask theme/plugin author for approval to provide a package to us for debugging on local development domain youtube-channel.wp
.
Upload the installation package to your cloud drive (Dropbox, One Drive, Google Drive, iCloud, WeTransfer or other) and provide a share link to us by contact form.
As a logged-in administrator, you will see an error explanation. Known issues:
YTC ERROR: Please check did you set the proper Channel ID. You choose to show videos from the channel, but YouTube does not recognize MyCoolLegacyName as an existing or public channel.Do what the message says - check and correct Channel ID in default settings/widget/shortcode.
YTC ERROR Check YouTube Data API Key restrictions, empty cache if enabled by appending in the browser address bar parameter ?ytc_force_recache=1
If there is no YTC ERROR
code in HTML source, visit Google API Explorer and append to the end of URL one of resource ID’s based on your Channel ID:
You will be able to reproduce HTTP Error w/o WordPress if you have SSH access to the server hosting your website. Log in to shell and run the following command (or ask your developer to do so):
curl https://www.googleapis.com/youtube/v3/playlistItems
You will get an HTTP Error from the curl command or response like the one below.
{ "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Required parameter: part", "locationType": "parameter", "location": "part" } ], "code": 400, "message": "Required parameter: part" } }
Known HTTP Errors:
error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm
Server tool curl has built with an older version of OpenSSL that does not support certificates signed with sha256-With-RSA-Encryption. It requires at least OpenSSL 0.9.8o for the total management of SHA256.
Please contact your server administrator or hosting provider to help you with this issue.
Problem with the SSL CA cert (path? access rights?)
Yet another server issue, not related to My YouTube Channel nor WordPress.
Please restart Apache (or Nginx) server. If that does not fix the issue, restart the entire server. Or contact server support to help.
Login to your YouTube account and visit page Account Advanced. Channel ID is YouTube Channel ID value composed of mixed characters starting with UC.
Check out Customized URL overview article.
Manually extract Playlist ID from YouTube playlist URL. Find string after &list=
parameter in URL.
Playlist ID can contain lowercase and uppercase letters, dash and underscore characters.
Regular playlists starts with uppercase letters PL (like PLEC850BE962234400), while Playlist ID for YouTube mixes start with uppercase RD (eg. RDCfMMlT8Lyns).
YouTube provide better videos if the height of the embedded video is 320 or more. If you use a small YTC video size, 240p will be loaded instead. It's not possible to force 720p in tiny YTC.
Hide YT Logo
and YouTube logo is still visibleThe modestbranding option does not work for all videos. A lot of videos still have the YouTube logo in the control bar. We recommend enabling the option Hide player controls
instead.
The logo appears in the upper right corner on hover or when the video pauses. Read more here
Start with following shortcode combination:
[youtube_channel num=7 responsive=1 class=ytc_wall_1-6 resource=2 random=1]
Then add custom CSS code to Customizer, or child theme style.css or to Head & Footer Code plugin:
.youtube_channel.ytc_wall_1-6 .ytc_video_container { padding: 5px; box-sizing: border-box; max-width: 33.333%; } .youtube_channel.ytc_wall_1-6 .ytc_video_container.ytc_video_1 { max-width: 100%; } @media screen and (max-width: 768px) { .youtube_channel.ytc_wall_1-6 .ytc_video_container:not(.ytc_video_1) { max-width: 50%; } } @media screen and (max-width: 480px) { .youtube_channel.ytc_wall_1-6 .ytc_video_container:not(.ytc_video_1) { max-width: 100%; } }
That will show thumbnails for seven random videos from the default playlist defined in plugin settings: one full-width thumbnail and six remaining thumbnails distributed to 3 columns on wide screens, two columns under 768px and a single thumbnail per row under 480px.
My YouTube Channel does not support pagination.
Resize thumbnail play button by adding following custom CSS to Customizer, or child theme style.css or to Head & Footer Code plugin:
.youtube_channel .ytc_thumb>span:before { transform: scale(.65); }
To remove (hide) thumbnail play button, use following custom CSS:
.youtube_channel .ytc_thumb>span:before { display: none !important; }
Feel free to submit a feature request by creating a new topic on Community forum. Make sure to prefix Topic Title with [Feature Request] ... Please note, we cannot guarantee an ETA to implement the requested feature. If you are in a hurry, please find a developer to do it for you or request a quote from us.
My YouTube Channel
to resolve Misusing trademarks - The Display Namewpau-yt-channel
to resolve Misusing trademarks - The URLtheme
(themelight
), showinfo
(noinfo
, hideinfo
)skip
skip
to skip requested number of items