<?php
/**
 * REST namespace compatibility registration.
 *
 * @package ScheduledChanges
 */

namespace ScheduledChanges\Rest;

/** Registers canonical routes alongside the deprecated namespace. */
trait RegistersVersionedRoutes {
	/**
	 * Registers a route in the JJ\'s Post Scheduler REST namespace.
	 *
	 * @param string       $route Route path.
	 * @param array<mixed> $args Route configuration accepted by WordPress.
	 */
	private function registerVersionedRoute( string $route, array $args ): void {
		register_rest_route( 'scheduled-changes/v1', $route, $args );
	}
}
