bozdoz / wp-plugin-leaflet-map

Add leaflet maps to Wordpress with shortcodes
https://wordpress.org/plugins/leaflet-map/
GNU General Public License v2.0
140 stars 71 forks source link

set automatic the actual leaflet version on update #202

Closed hupe13 closed 1 year ago

hupe13 commented 1 year ago

It's a suggestion: If someone uses the default setting for javascript url and css url, it will be checked and updated if necessary on plugin updates.

bozdoz commented 1 year ago

Do you mean, update the db value if it was saved under an older version?

Maybe we could add a checkbox for "Use latest from CDN", and if that's checked, we always get the static, updated version. Maybe there's a "latest" url too

bozdoz commented 1 year ago

Yeah, looks like default could be: https://unpkg.com/leaflet@latest/dist/leaflet.js and https://unpkg.com/leaflet@latest/dist/leaflet.css

hupe13 commented 1 year ago

it will be checked

I mean, verify that the latest version is being used

checkbox for "Use latest from CDN",

This idea is good. This could also be done when there is no plugin update.

@latest

That wouldn't be so good for SEO to put that in the db. @latest is a redirect to the current version. The redirect url (e.g. @1.9.3) should be put into the db.

bozdoz commented 1 year ago

How is latest bad for SEO?

hupe13 commented 1 year ago

I read the documentation about SEO and 302 redirects again, it is not bad.

hupe13 commented 1 year ago

Hi Bozdoz, I have been working with this setup for a while now and have received repeated errors from unpkg.com. When I use a concrete version, there are never problems.

bozdoz commented 1 year ago

OK, so we can have a banner on the admin page that states whether they're up to date with latest in defaults