Open Zavi499 opened 1 week ago
WP being WordPress? This fork might be a good starting point—it makes a REST API that you could use in a plugin. For WordPress, I believe you would need a PHP back end. I don't know if it's easy to add NodeJS or if you would need to run it somewhere else and have the WordPress plugin be a client.
Alternatively, you could start from the generateRandom()
method in src/random.js
. The important calls from there are getEligiblePokemon
and chooseRandom
. If you want this all in plain JavaScript without any NodeJS, you would need PHP to render and call JavaScript like that.
Its not exactly an issue but a question , how can i convert this into WP-Plugin?