
如何修复XAMPP本地环境HTTP 404错误 “未找到请求的资源”
wp_send_json_success ( $data = null, $status_code = null, $options = 0 )
向Ajax请求发送一个JSON响应,表示成功。
function wp_send_json_success( $data = null, $status_code = null, $options = 0 ) { $response = array( 'success' => true ); if ( isset( $data ) ) { $response['data'] = $data; } wp_send_json( $response, $status_code, $options ); }