pattiereaves on v2
Fix chaining add_session_attrib⦠(compare)
pattiereaves on v2
Use 200 status on fail response⦠(compare)
Finally, I'm looking into creating a new skill in VoiceWP, and I'm sorry, but the current instructions are not complete enough for me.
That's where I'm lost...what do I do next? Clearly, I should create a function (where?). And, I should add my function to the voicewp_custom_skill hook (how, exactly?). I think it would look like this:
add_action( 'voicewp_custom_skill', 'my_function_name_here' );
That's as far as I could figure out tonight. Any help welcome!
add_action( 'voicewp_custom_skill', 'my_function_name_here', 10, 4 );
function my_function_name_here( $skill_type, $id, $request, $response ) {
// Take a look at alexa/skill/news.php
// the news_request() function shows the logic for getting the intent,
// and then performing the appropriate actions, and returning a response
}
So, I did something slightly different to try for flexibility. My skill is "explore" (for now).
This approach lets me create a new "Skill" post with WordPress, set the Skill Type to "explore", and it will use the explore class. The idea is to be able to keep the existing skills built into voiceWP, and to most easily extend it with minimal changes to the base VoiceWP code. And, I can call the same website and access multiple "skills", which is very useful.
So, to extend in this case:
What next:
Happy to share the work, of course!