paulund/wordpress-theme-customizer-custom-controls

Google Font Control doesn't pass theme check

Opened this issue · 2 comments

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

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).

I created a pull request with solutions for these issues ... #21