関数 wp_send_json_error()
定義ファイル :/blog/wp-includes/functions.php 13
wp_send_json_error()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /** * Send a JSON response back to an Ajax request, indicating failure. * * @since 3.5.0 * * @param mixed $data Data to encode as JSON, then print and die. */ function wp_send_json_error( $data = null ) { $response = array( 'success' => false ); if ( isset( $data ) ) $response['data'] = $data; wp_send_json( $response ); } |