Open bhubbard opened 8 years ago
Sunny's author here. This gist is now outdated as Cloudflare deprecated API v1.
I am now using TypistTech/cloudflare-wp-api which build on top of jamesryanbell/cloudflare
@TangRufus Thanks for letting us know, actually @sfgarza did a great job really building out this API library recently, I suggest you give it a look over, you might find it useful. While not done, it has functions built out for almost every CF API call possible.
Actually I am trying to do so.
What is the best practice to include this library?
This library is a full WP plugin. Embedding another plugin within a plugin is disallowed on wp.org
All I need is class CloudFlareAPI
.
Any plan on extract that class into its own package?
And give it a namespace so that plugin author can change that namespace it avoid class already defined
errors (see: https://github.com/typisttech/imposter)
Thanks!
Right now, you can just remove this line from composer.json
"type":"wordpress-plugin",
I will check with @sfgarza if we can get it changed to default to library instead. He can also better answer your last question.
To be clear you can also remove the wordpress plugin comment block at the top, but that's not a requirement as just including it in your project it gets ignored so it doesn't show up in plugins.