Skip to content

Instantly share code, notes, and snippets.

View brandondove's full-sized avatar

Brandon Dove brandondove

View GitHub Profile
<?php
/**
* POST to endpoint /wp-json/my-custom-endpoint/v1/save-string
*
* Send a string and use "Application Passwords" plugin and save to option
*/
add_action( 'rest_api_init', 'my_custom_endpoint', 10 );
/**
### Keybase proof
I hereby claim:
* I am brandondove on github.
* I am brandondove (https://keybase.io/brandondove) on keybase.
* I have a public key ASDkveaEeqc9F6AbCpZ3edOFnzCY3-LDYPLqCyzQOUTNAAo
To claim this, I am signing this object: