yeah, that might be needed indeed, i’ll add something in the next version.
frank
OK, open up /wp-content/plugins/wp-youtube-lyte/wp-youtube-lyte.php and on line 378 change
if ( empty( $_thisLyte ) ) {
// get info from youtube
// first get yt api key
$lyte_yt_api_key = get_option('lyte_yt_api_key','');
$lyte_yt_api_key = apply_filters('lyte_filter_yt_api_key', $lyte_yt_api_key);
into
if ( empty( $_thisLyte ) ) {
// get info from youtube
// first get yt api key
$lyte_yt_api_key = get_option('lyte_yt_api_key','');
if ($lyte_yt_api_key==="none") $lyte_yt_api_key="";
$lyte_yt_api_key = apply_filters('lyte_filter_yt_api_key', $lyte_yt_api_key);
(so actually just adding if ($lyte_yt_api_key==="none") $lyte_yt_api_key="";
in the mix)
once that is in there, simply enter “none” in the API key-field and the nagging will be over and done with, while Lyte will try to keep on using API v2.
I’ll put (something like) this in the next minor version.
Kind regards,
frank
Better even; I’ll add logic to simply not try to connect to the YT API and returning the thumbnail URL instead if api key is none.
The code (which would go on line 391:
if ($lyte_yt_api_key==="none") {
$_thisLyte['title']="this is not a title";
if ($playlist) {
$_thisLyte['thumbUrl']="";
$_thisLyte['HQthumbUrl']="";
} else {
$_thisLyte['thumbUrl']="http://i.ytimg.com/vi/".$vid."/hqdefault.jpg";
$_thisLyte['HQthumbUrl']="http://i.ytimg.com/vi/".$vid."/maxresdefault.jpg";
}
$_thisLyte['dateField']="";
$_thisLyte['duration']="";
$_thisLyte['description']="";
$_thisLyte['captions_data']="false";
$_thisLyte['captions_timestamp'] = "";
return $_thisLyte;
}
I’ll upload a test-version of what will become 1.6.2 to the wordpress.org SVN later this week/ beginning of next week.
frank
I uploaded the test version to wordpress.org’s SVN, you can download it here. As soon as you enter “none” (without the quotes) as key, WP YouTube Lyte will not display the nagging notice and will not try to contact any YT API any more.
frank
Just pushed out 1.6.2 with this feature added. thanks for the idea RedFox!