HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/mobilech/alliancelaptoptraining.com.np/wp-content/plugins/tutor/restapi/REST_Response.php
<?php
/**
 * Ensure REST response
 *
 * @package Tutor\RestAPI
 * @author Themeum <support@themeum.com>
 * @link https://themeum.com
 * @since 1.7.1
 */

namespace TUTOR;

use WP_REST_Response;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

trait REST_Response {

	/**
	 * Send response
	 *
	 * @since 1.7.1
	 * @since 2.7.0 renamed filter to tutor_rest_api_response like as pro API response.
	 *
	 * @param array $response The response data.
	 *
	 * @return WP_REST_Response
	 */
	public static function send( array $response ) {
		$response = new WP_REST_Response( $response );
		return rest_ensure_response( apply_filters( 'tutor_rest_api_response', $response ) );
	}
}