futtta / wp-youtube-lyte

Embed YouTube on WordPress for optimal performance
24 stars 10 forks source link

Dismiss API key notification #39

Closed borjaMarti closed 11 months ago

borjaMarti commented 11 months ago

I don't intend on using an API key, but this notification is permanently fixed on all dashboard sections.

(function lyte_admin_nag_apikey())

Can a dismiss option be added?

I'm not versed in PHP, but I've been looking into the code to see how I'd go about it to make a pull request. Found the function on options.php. I think I know how to add the Dismiss button and the conditional logic to not display the message, but I'm a bit lost on how I'd go about saving the option state.

If you point me in the right direction I'll get on it!

futtta commented 11 months ago

simply entering none in the API key field should be enough @borjaMarti :-)

borjaMarti commented 11 months ago

Oh wow, I'd been trying to enter a bogus key by using the Test Key button and it hadn't occured to me to Save Changes ><

Thank you very much for your timely response @futtta, I appreciate your work ^^