paulund / wordpress-theme-customizer-custom-controls

A collection of custom controls you can use in your Wordpress theme customizer page
548 stars 161 forks source link

Google Font Control doesn't pass theme check #11

Open design311 opened 10 years ago

design311 commented 10 years ago

File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls.

http://codex.wordpress.org/Filesystem_API

WordPress stackexchange: http://wordpress.stackexchange.com/questions/155480/wp-filesystem-in-custom-customize-control

ryanhellyer commented 9 years ago

This should use transients instead of defaulting to the file system to cache this data.

It also uses raw API keys in the code, which is not viable for themes submitted to the repository since Google doesn't not approve of sharing the API keys, and there are usage limits on each key. Theme users could either enter their own API key, or (better) the developer could cache the font options on their own server and access them via that instead (hence bypassing the need to share Google API keys).

ryanhellyer commented 9 years ago

I created a pull request with solutions for these issues ... https://github.com/paulund/wordpress-theme-customizer-custom-controls/pull/21