PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/islandpc.ca/wp-content/plugins/complianz-terms-conditions/rest-api/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/islandpc.ca/wp-content/plugins/complianz-terms-conditions/rest-api/rest-api.php

<?php defined( 'ABSPATH' ) or die( "you do not have acces to this page!" );
/**
 *
 * API for Gutenberg blocks
 *
 * @return array documents (id, title, content)
 *
 */

add_action( 'rest_api_init', 'cmplz_tc_documents_rest_route' );
function cmplz_tc_documents_rest_route() {
	register_rest_route( 'complianz_tc/v1', 'document/', array(
		'methods'  => 'GET',
		'callback' => 'cmplz_tc_rest_api_documents',
		'permission_callback' => '__return_true',
	) );
}

/**
 * @param WP_REST_Request $request
 *
 * @return array
 */
function cmplz_tc_rest_api_documents( WP_REST_Request $request ) {

	$html       = COMPLIANZ_TC::$document->get_document_html('terms-conditions');
	return array(
		'id'      => 'terms',
		'title'   => __("Terms and Conditions", "complianz-terms-conditions"),
		'content' => $html,
	);
}