関数 wp_send_json_success()
定義ファイル :/blog/wp-includes/functions.php 13
wp_send_json_success()
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 success. * * @since 3.5.0 * * @param mixed $data Data to encode as JSON, then print and die. */ function wp_send_json_success( $data = null ) { $response = array( 'success' => true ); if ( isset( $data ) ) $response['data'] = $data; wp_send_json( $response ); } |