pantheon-systems / google-map-gutenberg-block

MIT License
54 stars 6 forks source link

Use the WordPress HTTP API to check response code #26

Closed ataylorme closed 5 years ago

ataylorme commented 5 years ago

Closes #25.

Use the WordPress HTTP API instead of curl to check the response code of the map URL.

Cache the map URL response code in a transient to avoid request on each page load.

ataylorme commented 5 years ago

@johnbillion does this properly address your concerns in #25?

johnbillion commented 5 years ago

Looks good to me, although you might want to double check that storing an integer in a transient always results in an integer being returned both with and without a persistent object cache in place. I'm 99% sure that when a transient is stored in the options table, it'll always be returned as a string.

But yep looks good apart from that.

ataylorme commented 5 years ago

@johnbillion 378b50d should solve that.

Any other suggestions/objections? If not I'll merge this and get it in the next release.

johnbillion commented 5 years ago

lgtm