• Resolved TheGiantRedFox1986

    (@thegiantredfox1986)


    Hi mate,

    Firstly thanks for the plugin, so far it delivers exactly what it promised and I’m very happy! 🙂 Thanks for the hard work, keep it up.

    My only issue is that I don’t wish to grant the plugin API access so it won’t remove that annoying notice up on the backend: “For WP YouTube Lyte to function optimally, you should enter an YouTube API key in the settings screen..”

    Can you add like a checkmark that I can mark to remove it ?

    Thanks,
    BigFox

    https://wordpress.org/plugins/wp-youtube-lyte/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Frank Goossens

    (@futtta)

    yeah, that might be needed indeed, i’ll add something in the next version.

    frank

    Plugin Author Frank Goossens

    (@futtta)

    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

    Plugin Author Frank Goossens

    (@futtta)

    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

    Plugin Author Frank Goossens

    (@futtta)

    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

    Plugin Author Frank Goossens

    (@futtta)

    Just pushed out 1.6.2 with this feature added. thanks for the idea RedFox!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove Notice in backend’ is closed to new replies.