Creado por Henrique Silvério
hace casi 8 años
|
||
Pregunta | Respuesta |
wp_json_encode( $data, $options, $depth ) | Encode a variable into JSON, with some sanity checks. |
wp_send_json( $response ) | Send a JSON response back to an AJAX request, and die(). |
wp_send_json_success( $data ) | Send a JSON response back to an Ajax request, indicating success. The response object will always have a success key with the value true. If anything is passed to the function it will be encoded as the value for a data key. |
wp_send_json_error( $data ) | Send a JSON response back to an Ajax request, indicating failure. The response object will always have a success key with the value false. If anything is passed to the function in the $data parameter, it will be encoded as the value for a data key. |
¿Quieres crear tus propias Fichas gratiscon GoConqr? Más información.