Api_Server::add_endpoint_parts( array $params )

Method add_endpoint_parts


Parameters Parameters

$params

(Required)


Top ↑

Return Return

(array) $params


Source Source

File: src/core/classes/class-api-server.php

	public function add_endpoint_parts( $params ) {

		$endpoint_parts = explode( '/', $params['endpoint'] );

		if ( 2 === count( $endpoint_parts ) ) {
			$params['api_version'] = array_shift( $endpoint_parts );
			$params['integration'] = array_shift( $endpoint_parts );
		}

		return $params;
	}