How to receive JSON payload from a digital device

Your exact code would depend on how the HTTP notification is sent to your server and on the structure of the JSON, but the first building block is to listen for the incoming post request. There are lots of WP hooks that would be suitable. One is init, e.g.: add_action(‘init’, function() { $user=”the_correct_basic_auth_username”; $password = … Read more

Need wp rest api for featured video post

You have a custom post type called ‘video’ with a video_url field. You need to call register_post_meta in the rest_api_init hook to get the API to return this field, e.g. function register_post_meta_video_video_url( $wp_rest_server ) { register_post_meta( ‘video’, ‘video_url’, array( ‘type’ => ‘string’, ‘description’ => ‘Featured video URL’, ‘single’ => true, ‘show_in_rest’ => true, ) ); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)